Part Number Hot Search : 
A7303 TDA20 200CT AC513 BXMF1023 A7303 P20N60 BD6025GU
Product Description
Full Text Search
 

To Download ADMC300BST Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  rev. b information furnished by analog devices is believed to be accurate and reliable. however, no responsibility is assumed by analog devices for its use, nor for any infringements of patents or other rights of third parties which may result from its use. no license is granted by implication or otherwise under any patent or patent rights of analog devices. a admc300 one technology way, p.o. box 9106, norwood, ma 02062-9106, u.s.a. tel: 781/329-4700 world wide web site: http://www.analog.com fax: 781/326-8703 ? analog devices, inc., 2000 functional block diagram arithmetic units shifter mac alu memory sport 1 interval timer data ram 1k 16 program rom 2k 24 program ram 4k 24 program interrupt controller encoder interface pwm generation sigma-delta adcs auxiliary pwm adsp-2100 base architecture serial ports program sequencer data address generators dag 1 dag 2 program memory address bus data memory address bus program memory data bus data memory data bus sport 0 watch- dog timer event capture timers digital i/o 3212 7 10 2 56 motor control peripherals high performance dsp-based motor controller target applications industrial drives, servo drives, variable speed drives, electric vehicles features 25 mips fixed-point dsp core single cycle instruction execution (40 ns) adsp-2100 family code compatible independent computational units alu multiplier/accumulator barrel shifter multifunction instructions single cycle context switch powerful program sequencer zero overhead looping conditional instruction execution two independent data address generators memory configuration 4k 24-bit program memory ram 2k 24-bit program memory rom 1k 16-bit data memory ram high-resolution multichannel adc system five independent 16-bit sigma-delta adcs 76 db snr typical (enob > 12 bits) arranged in two independently clocked banks differential or single-ended inputs programmable sample frequency to 32.5 khz flexible synchronization of adc and pwm subsystems independent offset calibration for each channel two dedicated adc interrupts internal 2.5 v reference three multiplexer control pins for external expansion hardware or software convert start individual power-down for each bank three-phase pwm generation subsystem 16-bit dedicated pwm generator edge resolution to 40 ns programmable dead time programmable minimum pulsewidth double update mode allows duty cycle adjustment on half cycle boundaries special features for brushless dc motors hardwired polarity control external dedicated asynchronous shutdown pin ( pwmtrip ) additional shutdown pins in i/o system individual enable/disable of each output high frequency chopping mode transparent transition to overmodulation range with duty cycles of 100% programmable interrupt controller manages priority and masking of 11 peripheral interrupts (continued on page 7)
C2C rev. b admc300?pecifications recommended operating conditions b grade parameter min max units v dd digital supply voltage 4.50 5.50 v av dd analog supply voltage 4.50 5.50 v t amb ambient operating temperature ?0 +85 c electrical characteristics parameter test conditions min max unit v ih hi-level input voltage 1, 2 @ v dd = max 2.0 v v il lo-level input voltage 1, 2 @ v dd = min 0.8 v v oh hi-level output voltage 1, 3 @ v dd = min, 2.4 v i oh = ?.0 ma @ v dd = min, v dd ?0.3 v i oh = ?.1 ma v ol lo-level output voltage 1, 3 @ v dd = min, 0.4 v i ol = 2.0 ma i ih hi-level input current 4 @ v dd = max, 10 a v in = v dd max i ih hi-level pwmtrip , pio0?io11 current @ v dd = max, 100 a v in = v dd max i ih hi-level pwmpol current @ v dd = max, 10 a v in = v dd max i il lo-level input current 4 @ v dd = max, 10 a v in = 0 v i il lo-level pwmtrip , pio0?io11 current @ v dd = max, 10 a v in = 0 v i il lo-level pwmpol current @ v dd = max, 100 a v in = 0 v i ozh hi-level three-state leakage current 5 @ v dd = max, 10 a v in = v dd max i ozl lo-level three-state leakage current 5 @ v dd = max, 10 a v in = 0 v i dd digital power supply current (dynamic) 6, 7 @ v dd = max 100 ma i dd analog power supply current (disabled) 8 @ av dd = v dd = max 100 a i dd analog power supply current (ref only) @ av dd = v dd = max 6.5 ma i dd analog power supply current (ref + banka) @ av dd = v dd = max 11.0 ma i dd analog power supply current (ref + bankb) @ av dd = v dd = max 13.0 ma i dd analog power supply current (ref + banka/b) @ av dd = v dd = max 18.0 ma notes 1 bidirectional pins: pio0?io11, rfs0, rfs1, tfs0, tfs1, sclk0, sclk1. 2 input only pins: pwmtrip , pwmpol, reset , eia, eib, eizp, dr1a, dr1b, dr0, clkin. 3 output pins: pwmsync, cl, ch, bl, bh, al, ah, mux0?ux2, aux0, aux1, clkout, dt0, dt1. 4 input only pins: reset , eia, eib, eizp, dr1a, dr1b, dr0, clkin. 5 three-stateable pins: dt0, dt1, rfs0, rfs1, tfs0, tfs1, sclk0, sclk1. 6 current reflects device operating with no output loads. 7 dynamic condition refers to continuous operation of the dsp core, adc banks and pwm generation in single update mode with pwmtm = 0x0480, adcdiva = adcdivb = 0x180. the encoder inputs are quiescent. 8 disabled refers to powering down both adc banks and the internal reference generation circuit by setting bits 10, 11 and 12 of the adcctrl register. current is total current from av dd supply. specifications subject to change without notice. (v dd = av dd = 5 v 10%, gnd = agnd = 0 v, t amb = ?0 c to +85 c, clkin = 12.5 mhz, unless otherwise noted)
C3C rev. b admc300 voltage reference parameter test conditions min typ max unit v ref voltage level 2.25 2.75 v source current ?00 a power supply rejection ratio (psrr) ? 5 mv/v specifications subject to change without notice. pulsewidth modulator parameter test conditions min typ max unit counter resolution 1 16 bits edge resolution double update mode 40 ns t d programmable dead time 0 81.84 s programmable dead time increments 80 ns t min programmable pulse deletion 0 40.92 s programmable deletion increments 40 ns f pwm pwm frequency range 1 191 hz t sync pwmsync pulsewidth 0.04 10.24 s f chop gate drive chop frequency 0.0244 6.25 mhz notes 1 resolution varies with pwm switching frequency, 191 hz = 16 bits, 3.05 khz = 12 bits, 48.8 khz = 8 bits (12.5 mhz clkin) in sin gle update mode. specifications subject to change without notice. (v dd = av dd = 5 v 10%, gnd = agnd = 0 v, v refin = 2.50 v, t amb = ?0 c to +85 c, clkin = 12.5 mhz, unless otherwise noted) (v dd = av dd = 5 v 10%, gnd = agnd = 0 v, t amb = ?0 c to +85 c, clkin = 12.5 mhz, unless otherwise noted) (v dd = av dd = 5 v 10%, gnd = agnd = 0 v, t amb = ?0 c to +85 c, clkin = 12.5 mhz, unless otherwise noted) analog-to-digital converter parameter test conditions min typ max unit signal-to-noise ratio 1 (snr) @v dd = 5.0 v, 72 76 db total harmonic distortion 1 (thd) @ f s = 32.55 khz, ?0 db common-mode rejection ratio 2 (cmrr) @ f in = 1.017 khz, ?2 db channel-channel crosstalk 3 adcdivn = 0x180, ?6 db gain error v1?5 = 4.0 v p-p 5 % gain v1n?5n = v refin = 2.5 v 10,600 lsb/v v in analog input range 4 0v dd v v diff analog input voltage (differential) 4 v dd /2 v v offset dc offset voltage 5 55 mv f mod, max maximum sigma-delta modulator rate adcdiva = 0x180 2.08 mhz adcdivb = 0x180 f s, max maximum adc sample rate 6 adcdiva = 0x180 32.55 khz adcdivb = 0x180 v refin reference input voltage 7 2.4 2.5 2.6 v r in equivalent input resistance 8 25 k ? notes 1 snr measured with adc channel configured in single-ended mode. snr measurement does not include harmonic distortion, thd inclu des first six harmonics. the effective number of bits (enob) is related to the snr by snr = 6.02 (enob) +1.76 db. input signal filtered at 1.5 khz. 2 input signal applied to both pins of input differential pair of adc channel. 3 input signal applied to four adc channels, dc applied to fifth, measurement taken at fifth adc channel. 4 peak-peak input voltage in differential input configuration is half that in single-ended mode. 5 this offset may be corrected for, using the adc calibration feature. 6 at maximum sigma-delta modulator rate of 2.08 mhz. 7 input reference pins: refina, refinb. 8 analog signal input pins: v1?5, v1n?5n. specifications subject to change without notice.
C4C rev. b admc300?pecifications encoder interface unit parameter test conditions min typ max unit f enc, max maximum encoder pulse rate 1 3.1 mhz notes 1 assumes perfect quadrature encoder signals. specifications subject to change without notice. auxiliary pwm outputs parameter test conditions min typ max unit resolution 8 bits f auxpwm switching frequency 48.8 khz specifications subject to change without notice. (v dd = av dd = 5 v 10%, gnd = agnd = 0 v, t amb = ?0 c to +85 c, clkin = 12.5 mhz, unless otherwise noted) (v dd = av dd = 5 v 10%, gnd = agnd = 0 v, t amb = ?0 c to +85 c, clkin = 12.5 mhz, unless otherwise noted) timing parameters parameter min max unit clock signals t ck is defined as 0.5 t cki . the admc300 uses an input clock with a frequency equal to half the instruction rate; a 12.5 mhz input clock (which is equivalent to 80 ns) yields a 40 ns processor cycle (equivalent to 25 mhz). t ck values within the range of 0.5 t cki period should be substituted for all relevant timing parameters to obtain specification value. example: t ckh = 0.5 t ck ?10 ns = 0.5 (40 ns) ?10 ns = 10 ns. timing requirements : t cki clkin period 80 150 ns t ckil clkin width low 20 ns t ckih clkin width high 20 ns switching characteristics : t ckl clkout width low 0.5 t ck ?10 ns t ckh clkout width high 0.5 t ck ?10 ns t ckoh clkin high to clkout high 0 20 ns control signals timing requirement: t rsp reset width low 5 t ck 1 ns pwm shutdown signals timing requirements: t pwmtpw pwmtrip width low 3 t ck ns t piopwm pio width low 3 t ck ns notes 1 applies after power-up sequence is complete. internal phase lock loop requires no more than 2000 clkin cycles assuming stable c lkin (not including crystal oscillator start-up time). specifications subject to change without notice. clkin clkout t ckoh t cki t ckih t ckh t ckl t ckil figure 1. clock signals
admc300 C5C rev. b caution esd (electrostatic discharge) sensitive device. electrostatic charges as high as 4000 v readily accumulate on the human body and test equipment and can discharge without detection. although the admc300 features proprietary esd protection circuitry, permanent damage may occur on devices subjected to high-energy electrostatic discharges. therefore, proper esd precautions are recommended to avoid performance degradation or loss of functionality. absolute maximum ratings* supply voltage (v dd ) . . . . . . . . . . . . . . . . . . ?.3 v to +7.0 v supply voltage (av dd ) . . . . . . . . . . . . . . . . . ?.3 v to +7.0 v input voltage . . . . . . . . . . . . . . . . . . . . ?.3 v to v dd + 0.3 v output voltage swing . . . . . . . . . . . . . ?.3 v to v dd + 0.3 v operating temperature range (ambient) . . . 40 c to +85 c ordering guide temperature instruction package package model range rate description option ADMC300BST ?0 c to +85 c 25 mhz 80-lead plastic thin quad flatpack (tqfp) st-80 admc300-advevalkit development tool kit admc300-pb evaluation/processor board parameter min max unit serial ports timing requirements: t sck sclk period 50 ns t scs dr/tfs/rfs setup before sclk low 5 ns t sch dr/tfs/rfs hold after sclk low 10 ns t scp sclk in width 20 ns switching characteristics: t cc clkout high to sclk out 0.25 t ck 0.25 t ck + 15 ns t scde sclk high to dt enable 0 ns t scdv sclk high to dt valid 20 ns t rh tfs/rfs out hold after sclk high 0 ns t rd tfs/rfs out delay from sclk high 20 ns t scdh dt hold after sclk high 0 ns t scdd sclk high to dt disable 20 ns specifications subject to change without notice. t scp t scp clkout sclk dr rfs in tfs in dt t cc t cc t scs t sch t rd t rh rfs out tfs out t scdv t scde t scdh t scdd t sck figure 2. serial ports storage temperature range . . . . . . . . . . . . ?5 c to +150 c lead temperature (5 sec) . . . . . . . . . . . . . . . . . . . . . . +280 c *stresses greater than those listed above may cause permanent damage to the device. these are stress ratings only; functional operation of the device at these or any other conditions greater than those indicated in the operational sections of this specification is not implied. exposure to absolute maximum rating conditions for extended periods may affect device reliability. warning! esd sensitive device
admc300 C6C rev. b pin pin pin no. type name 1gndgnd 2i dr0 3 o dt0 4 i/o rfs0 5 i/o tfs0 6 i/o sclk0 7 sup v dd 8gndgnd 9i pwmtrip 10 o pwmsync 11 o cl 12 o ch 13 o bl 14 gnd gnd 15 sup v dd 16 o bh 17 o al 18 o ah 19 o mux0 20 o mux1 pin pin pin no. type name 21 o mux2 22 gnd gnd 23 sup v dd 24 o aux0 25 o aux1 26 i/o pio0 27 i/o pio1 28 i/o pio2 29 i/o pio3 30 i/o pio4 31 gnd gnd 32 sup v dd 33 i/o pio5 34 i/o pio6 35 i/o pio7 36 i/o pio8 37 i/o pio9/convst 38 i/o pio10/etu0 39 i/o pio11/etu1 40 gnd agnd pin pin pin no. type name 41 sup av dd 42 i v5n 43 i v5 44 i v4n 45 i v4 46 i v3n 47 i v3 48 sup av dd 49 gnd agnd 50 gnd agnd 51 sup av dd 52 i refinb 53 i refina 54 o vref 55 i v2n 56 i v2 57 i v1n 58 i v1 59 sup av dd 60 gnd agnd pin pin pin no. type name 61 gnd gnd 62 gnd gnd 63 i eizp 64 i eia 65 i eib 66 i reset 67 i pwmpol 68 gnd gnd 69 i clkin 70 o xtal 71 o clkout 72 gnd gnd 73 sup v dd 74 i dr1a 75 i dr1b 76 o dt1 77 i/o rfs1/ srom 78 i/o tfs1 79 i/o sclk1 80 sup v dd pin configuration 80-lead plastic thin quad flatpack (tqfp) (st-80) pin function descriptions 80 79 78 77 76 75 74 73 72 71 70 69 68 67 66 65 64 63 62 61 56 57 58 59 54 55 52 53 50 51 60 45 46 47 48 43 44 42 49 41 14 13 18 17 16 15 11 10 20 19 12 9 8 7 6 5 4 3 2 1 pin 1 identifier top view (not to scale) 40 39 38 37 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 36 v dd sclk1 dt1 mux2 gnd v dd aux0 aux1 pio0 pio1 pio2 pio3 pio4 gnd v dd pio5 pio6 pio7 pio8 pio9/convst pio10/etu0 pio11/etu1 dr1b dr1a v dd gnd clkout xtal clkin gnd pwmpol reset eib eia eizp gnd gnd agnd av dd v1 v1n v2 v2n vref refina refinb av dd agnd agnd av dd v3 v3n v4 v4n v5 v5n av dd gnd dr0 dt0 rfs0 tfs0 sclk0 v dd gnd pwmtrip pwmsync cl ch bl gnd v dd bh al ah mux0 mux1 rfs1/ srom tfs1 agnd admc300
admc300 C7C rev. b flexible encoder interface subsystem incremental encoder interface dedicated three pin interface (eia, eib, eizp) 16-bit quadrature counter input encoder signals to 3.1 mhz optional use of zero marker to reset counter single north marker modepermits single reset of counter on only first zero marker status bits to read encoder inputs companion encoder event system for accuracy enhancements at low speeds associated eiu loop timer permits regular, programmable updating of all encoder and event timer registers eiu timer can also be used as general purpose timer if not linked to eiu block peripheral i/o (pio) subsystem 12-pin digital i/o port bit configurable as input or output each pin configurable as rising edge, falling edge, high level or low level interrupt four dedicated pio interrupts for pio0 to pio3 one combined interrupt for pio4 to pio11 each i/o line configurable as pwm trip source two 8-bit auxiliary pwm outputs synthesized analog output fixed 48.8 khz operation 0 to 99.6% duty cycle event timer unit two event timer channels with dedicated event capture blocks permits timing of duty-cycle, period and frequency configurable event definition dedicated event timer interrupt event timer readable on-the-fly 16-bit watchdog timer programmable 16-bit interval timer with prescaler two double buffered synchronous serial ports four boot load protocols via sport1 e 2 prom/srom booting uart booting (sci compatible) with autobaud feature synchronous master booting with autobaud feature synchronous slave booting with autobaud feature debugger interface via sport1 with autobaud (uart and synchronous supported) rom utilities full debugger for program development preprogrammed math functions preprogrammed motor control functionsvector transformations 80-lead tqfp package industrial temperature range C40 c to +85 c (continued from page 1) general description the admc300 is a single-chip dsp-based controller, suitable for high performance control of ac induction motors, permanent magnet synchronous motors and brushless dc motors. the admc300 integrates a 25 mips, fixed-point dsp core with a complete set of motor control peripherals that permits fast, efficient development of servo motor controllers. the dsp core of the admc300 is the adsp-2171, which is completely code compatible with the adsp-2100 dsp family and combines three computational units, data address genera- tors and a program sequencer. the computational units com- prise an alu, a multiplier/accumulator (mac) and a barrel shifter. the adsp-2171 adds new instructions for bit manipu- lation, multiplication (x squared), biased rounding and global interrupt masking. in addition, two flexible, double-buffered, bidirectional, synchronous serial ports are included in the admc300. the admc300 provides 4k 24-bit program memory ram, 2k 24-bit program memory rom and 1k 16-bit data memory ram. the program and data memory ram can be boot loaded through the serial port from either a serial srom/ e 2 prom, asynchronous (uart) connection, or synchro- nous connection. the program memory rom includes a monitor that adds software debugging features through the serial port. in addition, a number of pre-programmed math- ematical and motor control functions are included in the program memory rom. the motor control peripherals of the admc300 comprise a high performance, five channel adc system that uses sigma- delta conversion technology offering a typical signal-to-noise ratio (snr) of 76 db, equivalent to 12 bits. in addition, a 16-bit center-based pwm generation unit can be used to produce high accuracy pwm signals with minimal processor overhead. the admc300 also contains a flexible encoder interface unit for position sensor feedback, two auxiliary pwm outputs, twelve lines of digital i/o, a two-channel event capture system, a 16-bit watchdog timer, a 16-bit interval timer and a programmable interrupt controller that manages all peripheral interrupts.
admc300 C8C rev. b dsp core architecture overview figure 3 is an overall block diagram of the dsp core of the admc300, which is based on the fixed-point adsp-2171. the adsp-2171 flexible architecture and comprehensive instruction set allows the processor to perform multiple operations in paral- lel. in one processor cycle (40 ns with a 12.5 mhz clkin) the dsp core can: ? generate the next program address. ? fetch the next instruction. ? perform one or two data moves. ? update one or two data address pointers. ? perform a computational operation. this all takes place while the processor continues to: ? receive and transmit through the serial ports. ? decrement the interval timer. ? generate pwm signals. ? convert the adc input signals. ? operate the encoder interface unit. ? operate all other peripherals including the auxiliary pwm and event timer subsystem. the processor contains three independent computational units: the arithmetic and logic unit (alu), the multiplier/accumulator (mac) and the shifter. the computational units process 16-bit data directly and have provisions to support multiprecision computations. the alu performs a standard set of arithmetic and logic operations; division primitives are also supported. the mac performs single-cycle multiply, multiply/add, multiply/ subtract operations with 40 bits of accumulation. the shifter performs logical and arithmetic shifts, normalization, denormal- ization, and derive exponent operations. the shifter can be used to efficiently implement numeric format control including floating- point representations. the internal result (r) bus directly connects the computational units so that the output of any unit may be the input of any unit on the next cycle. a powerful program sequencer and two dedicated data address generators ensure efficient delivery of operands to these computa- tional units. the sequencer supports conditional jumps and subroutine calls and returns in a single cycle. with internal loop counters and loop stacks, the admc300 executes looped code with zero overhead; no explicit jump instructions are required to maintain the loop. bus exchange data address generator #2 data address generator #1 14 14 24 16 6 r bus 16 companding circuitry dma bus pma bus dmd bus pmd bus program sequencer instruction register input regs output regs shifter input regs output regs mac input regs output regs alu serial port 0 receive reg transmit reg control logic dm ram 1k 16 pm rom 2k 24 pm ram 4k 24 serial port 1 receive reg transmit reg 5 timer figure 3. dsp core block diagram
admc300 C9C rev. b two data address generators (dags) provide addresses for simultaneous dual operand fetches from data memory and program memory. each dag maintains and updates four address pointers (i registers). whenever the pointer is used to access data (indirect addressing), it is post-modified by the value in one of four modify (m) registers. a length value may be associated with each pointer (l registers) to implement automatic modulo addressing for circular buffers. the circular buffering feature is also used by the serial ports for automatic data transfers to and from on-chip memory. dag1 generates only data memory address but provides an optional bit-reversal capability. dag2 may generate either program or data memory addresses, but has no bit-reversal capability. efficient data transfer is achieved with the use of five internal buses: ? program memory address (pma) bus ? program memory data (pmd) bus ? data memory address (dma) bus ? data memory data (dmd) bus ? result (r) bus program memory can store both instructions and data, permit- ting the admc300 to fetch two operands in a single cycle one from program memory and one from data memory. the admc300 can fetch an operand from on-chip program memory and the next instruction in the same cycle. the admc300 writes data from its 16-bit registers to the 24-bit program memory using the px register to provide the lower eight bits. when it reads data (not instructions) from 24-bit program memory to a 16-bit data register, the lower eight bits are placed in the px register. the admc300 can respond to a number of distinct dsp core and peripheral interrupts. the dsp core interrupts include serial port receive and transmit interrupts, timer interrupts, software interrupts and external interrupts. the motor control peripherals also produce interrupts to the dsp core. the two serial ports (sports) provide a complete synchro- nous serial interface with optional companding in hardware and a wide variety of framed and unframed data transmit and re- ceive modes of operation. each sport can generate an inter- nal programmable serial clock or accept an external serial clock. boot loading of both the program and data memory ram of the admc300 is through the serial port sport1. a programmable interval counter is also included in the dsp core and can be used to generate periodic interrupts. a 16-bit count register (tcount) is decremented every n processor cycles, where n? is a scaling value stored in the 8-bit tscale register. when the value of the counter reaches zero, an interrupt is generated and the count register is reloaded from a 16-bit period register (tperiod). the admc300 instruction set provides flexible data moves and multifunction (one or two data moves with a computation) instructions. each instruction is executed in a single 40 ns processor cycle (for a 12.5 mhz clkin). the admc300 assembly language uses an algebraic syntax for ease of coding and readability. a comprehensive set of development tools support program development. for further information on the dsp core, refer to the adsp-2100 family user? manual, third edition , with particular reference to the adsp-2171. serial ports the admc300 incorporates two complete synchronous serial ports (sport0 and sport1) for serial communication and multiprocessor communication. following is a brief list of capa- bilities of the admc300 sports. refer to the adsp-2100 family user? manual, third edition, for further details. sports are bidirectional and have a separate, double- buffered transmit and receive section. sports can use an external serial clock or generate their own serial clock internally. sports have independent framing for the receive and transmit sections. sections run in a frameless mode or with frame synchronization signals internally or externally generated. frame synchronization signals are active high or inverted, with either of two pulsewidths and timings. sports support serial data word lengths from 3 bits to 16 bits and provide optional a-law and -law companding ac- cording to itu (formerly ccitt) recommendation g.711. sport receive and transmit sections can generate unique interrupts on completing a data word transfer. sports can receive and transmit an entire circular buffer of data with only one overhead cycle per data word. an inter- rupt is generated after a data buffer transfer. sport0 has a multichannel interface to selectively receive and transmit a 24-word or 32-word, time-division multi- plexed, serial bitstream. sport1 can be configured to have two external interrupts ( irq0 and irq1 ), and the flag in and flag out signals. the internally generated serial clock may still be used in this configuration. sport1 is the default input for program and data memory boot loading. the rfs1 pin can be configured internal to the admc300 as an srom/e 2 prom reset signal. sport1 has two data receive pins (dr1a and dr1b). the dr1a pin is intended for synchronous boot loading from the external srom/e 2 prom. the dr1b pin can be used as the data receive pin for boot loading from an external uart (sci compatible) or synchronous connection, as the data receive pin for the debugger communicating over the debugger interface, or as the data receive pin for a general purpose sport after booting. these two pins are i nternally multiplexed onto the one dr1 port of the sport. the par- ticular data r eceive pin selected is determined by a bit in the modectrl register.
admc300 C10C rev. b pin function description the admc300 is available in an 80-lead tqfp package. table i contains the pin descriptions. table i. pin list pin # group of input/ name pins output function reset 1 i processor reset input. sport0 5 i/o serial port 0 pins (tfs0, rfs0, dt0, dr0, sclk0). sport1 6 i/o serial port 1 pins (tfs1, rfs1, dt1, dr1a, dr1b, sclk1). clkout 1 o processor clock output. clkin, xtal 2 i, o external cl ock or quartz cr ystal connection point. pio0?io11 12 i/o digital i/o port, external con- vert start and event timer pins. aux0?ux1 2 o auxiliary pwm outputs. ah?l 6 o pwm outputs. pwmtrip 1 i pwm trip signal. pwmpol 1 i pwm polarity pin. pwmsync 1 o pwm synchronization pin. v1?5 5 i noninverting inputs of the dif- ferential adcs?input amplifiers. v1n?5n 5 i inverting inputs of the differen- tial adcs input amplifiers. refina 2 i voltage reference inputs for refinb adcs. vref 1 o voltage reference output. mux0?ux2 3 o multiplexer control lines. eia, eib, eizp 3 i encoder interface pins. av dd 4 analog power supply. agnd 4 analog ground. v dd 6 digital power supply. gnd 9 digital ground. interrupt overview the admc300 can respond to nineteen different interrupt sources, eight of which are internal dsp core interrupts and eleven interrupts from the motor control peripherals. the eight dsp core interrupts comprise the peripheral ( irq2 ), sport0 receive, sport0 transmit, sport1 receive (or irq0 ), sport1 transmit (or irq1 ), two software and the interval timer interrupts. in addition, the motor control peripherals add eleven interrupts that include two adc, two pwm, five pe ripheral i/o, one en- coder interface and one event timer interrupt. the interrupts are internally prioritized and individually maskable. all peripheral interrupts are multiplexed into the dsp core through the pe- ripheral irq2 interrupt. the programmable interrupt controller manages the masking and vector addressing of all eleven periph- eral interrupts. a detailed description of the operation of the entire interrupt system of the admc300 is given later, after a more detailed description of the various peripheral systems. memory map the admc300 has two distinct memory types; program memory and data memory. in general, program memory con- tains user code and coefficients, while the data memory is used to store variables and data during program execution. both pro- gram memory ram and rom is provided on the admc300. program memory ram is arranged in two noncontiguous 2k 24-bit blocks, one starting at address 0x0000 and the other at 0x1800. program memory rom is located at address 0x0800. data memory is arranged as a 1k 16-bit block starting at address 0x3800. the motor control peripherals are memory mapped into a region of the data memory space starting at 0x2000. the complete program and data memory maps are given in tables ii and iii respectively. table ii. program memory map memory address range type function 0x0000?x005f ram interrupt vector table 0x0060?x071f ram user program space 0x0720?x07df ram reserved by debugger 0x07e0?x07ff ram reserved by monitor 0x0800?x0e20 rom rom monitor 0xe21?xfd6 rom rom math and motor control utilities 0xfd7?x0fff rom reserved 0x1000?x17ff unused 0x1800?x1fff ram user program space 0x2000?x3fff unused table iii. data memory map memory address range type function 0x0000?x1fff unused 0x2000?x20ff memory mapped registers 0x2100?x37ff unused 0x3800?x3b5f ram user data space 0x3b60?x3bff ram reserved by monitor 0x3c00?x3fff memory mapped registers rom code the 2k 24-bit block of program memory rom starting at ad- dress 0x0800 contains a monitor function that is used to download and execute user programs via the serial port. in addition, the monitor function supports an interactive mode in which com- mands are received and processed from a host. an example of such a host is the windows -based motion control debugger that is part of the software development system for the admc300. in the interactive mode, the host can access both the internal dsp and peripheral motor control registers of the admc300, read and write to both program and data memory, implement breakpoints and perform single-step and run/halt operation as part of the pro- gram debugging cycle. in addition to the monitor function, the program memory rom contains a number of useful mathematical and motor control util- ities that can be called as subroutines from the user code. a com- plete list of these rom functions is given in table iv. the start address of the function in the program memory rom is also given. refer to the admc300 dsp motor controller devel oper? reference manual for more details of the rom functions. windows is a registered trademark of microsoft corporation.
admc300 C11C rev. b table iv. rom utilities utility address function per_rst 0x07e4 peripheral reset. umask 0x0e21 limits unsigned value to given range. put_vector 0x0e28 facilitates user setup of vector table. smask 0x0e35 limits signed value to given range. admc_cos 0x0e55 cosine function. admc_sin 0x0e5c sine function. arctan 0x0e72 arctangent function. reciprocal 0x0e94 reciprocal (1/x) function. sqrt 0x0eaa square root function. ln 0x0ee4 natural logarithm function. log 0x0ee7 loga rithm (base 10) fun ction. fltone 0x0f03 fixed point to floating point conversion. fixone 0x0f08 floating point to fixed point conversion. fpa 0x0f0c floating point addition. fps 0x0f1b floating point subtraction. fpm 0x0f2b floating point multiplication. fpd 0x0f34 floating point division. fpmacc 0x0f55 floating point multiply and accumulate. park 0x0f77 forward and reverse park transformation (vector rotation). rev_clark 0x0f8b reverse clark transformation. for_clark 0x0fa1 forward clark transformation. sdivqint 0x0fab unsigned single precision division (integer). sdivq 0x0fb4 unsigned single precision division (fractional). exit 0x0fc6 exit to debugger after running user program. system interface figure 4 shows a basic system configuration for the admc300 with an external crystal and serial e 2 prom for boot loading of program and data memory ram. admc300 xtal clkin dr1a sclk1 rfs1/ srom data clk reset 12.5 mhz clkout reset serial e 2 prom 20pf 20pf figure 4. basic system configuration clock signals the admc300 can be clocked by either a crystal or a ttl- compatible clock signal. the clkin input cannot be halted, changed during operation or operated below the specified minimum frequency during normal operation. if an external clock is used, it should be a ttl-compatible signal running at half the instruction rate. the signal is connected to the clkin pin of the admc300. in this mode, with an external clock signal, the xtal pin must be left unconnected. the admc300 uses an input clock with a frequency equal to half the instruc- tion rate; a 12.5 mhz input clock yields a 40 ns processor cycle (which is equivalent to 25 mhz). normally instructions are executed in a single processor cycle. all device timing is relative to the internal instruction rate, which is indicated by the clkout signal. because the admc300 includes an on-chip oscillator circuit, an external crystal may be used instead of a clock source, as shown in figure 4. the crystal should be connected across the clkin and xtal pins, with two capacitors as shown in figure 4. a parallel-resonant, fundamental frequency, micro- processor-grade crystal should be used. a clock output signal (clkout) is generated by the processor at the processor? cycle rate of twice the input frequency. reset the reset signal initiates a master reset of the admc300. the reset signal must be asserted during the power-up se- quence to assure proper initialization. reset during initial power-up must be held long enough to allow the internal clock to stabilize. if reset is activated any time after power-up, the clock continues to run and does not require stabilization time. the power-up sequence is defined as the total time required for the crystal oscillator circuit to stabilize after a valid v dd is ap- plied to the processor, and for the internal phase-locked loop (pll) to lock onto the specific crystal frequency. a minimum of 2000 clkin cycles ensures that the pll has locked, but does not include the crystal oscillator start-up time. during this power-up sequence, the reset signal should be held low. on any subsequent resets, the reset signal must meet the mini- mum pulsewidth specification, t rsp . if an rc circuit is used to generate the reset signal, the use of an external schmitt trigger is recommended. the master reset sets all internal stack pointers to the empty stack condition, masks all interrupts, initializes dsp core regis- ters and performs a full reset of all of the motor control periph- erals. when the reset line is released, the first instruction is fetched from internal program memory rom at location 0x0800. the internal monitor code at this location then commences the boot-loading sequence over the serial port, sport1. boot loading on power-up or reset, the admc300 is configured so that execution begins at the internal pm rom at address 0x0800. this starts execution of the internal monitor function that first performs some initialization functions and copies a default inter- rupt vector table to addresses 0x0000?x005f of program memory ram. the monitor next attempts to boot load from an external srom or e 2 prom on sport1 using the three wire connec- tion of figure 4. the monitor program first toggles the rfs1/ srom pin of the admc300 to reset the serial memory device. if an srom or e 2 prom is connected to sport1, data is clocked into the admc300 at a rate clkout/26. both
admc300 C12C rev. b program and data memory ram can be loaded from the srom/ e 2 prom. after the boot load is complete, program execution begins at address 0x0060. this is where the first instruction of the user code should be placed. if boot loading from an e 2 prom is unsuccessful, the monitor code reconfigures sport1 as a uart and attempts to receive commands from an external device on this serial port. the monitor then waits for a byte to be received over sport1, locks onto the baud rate of the external device (autobaud fea- ture) and takes in a header word that tells it with what type of device it is communicating. there are six alternatives: ? a uart boot loader such as a motorola 68hc11 sci port. ? a synchronous slave boot loader (the clock is external). ? a synchronous master boot loader (the admc300 provides the clock). ? a uart debugger interface. ? a synchronous master debugger interface. ? a synchronous slave debugger interface. with the debugger interface, the monitor enters interactive mode in which it processes commands received from the external device. dsp control registers the dsp core has a system control register, syscntl, memory mapped at dm (0x3fff). sport0 is enabled when bit 12 is set, disabled when this bit is cleared. sport1 is enabled when bit 11 is set, disabled when this bit is cleared. sport1 is con- figured as a serial port when bit 10 is set, or as flags and inter- rupt lines when this bit is cleared. for proper operation of the admc300, all other bits in this register must be cleared (which is their default). the dsp core has a wait state control register, memwait, memory mapped at dm (0x3ffe). for proper operation of the admc300, this register must always contain the value 0x8000 (which is the default). the configuration of both the syscntl and memwait registers of the admc300 is shown at the end of the data sheet. analog-to-digital conversion system a functional block diagram of the adc system of the admc300 is shown in figure 5. the adc system provides the high perfor- mance conversion required for precision applications. it integrates five completely independent analog-to-digital converters based on sigma-delta conversion technology. each adc channel may v1 v1n v2 v2n v3 v3n v4 v4n v5 v5n 16-bit adc banka adc bankb refina refinb adccal (4?) adcctrl (15?) adc5 (15?) adc4 (15?) adc3 (15?) adc2 (15?) multiplexer control convst(pio9) mux0 mux1 mux2 adcdiva (11?) adcdivb (11?) adcsync (60) internal voltage reference generator update adc1 (15?) adc register update control calibration multiplexer 16-bit 16-bit 16-bit 16-bit v ref dsp data memory bus figure 5. functional block diagram of adc system of admc300
admc300 C13C rev. b be configured as either a differential or single-ended input for maximum flexibility in interfacing to external sensors and inputs. the sigma-delta converter consists of two stages, a modulator and a sinc filter, that combine to produce a 16-bit conversion. for each channel, signal-to-noise ratios of 76 db may be achieved, corresponding to greater than 12 bits of resolution from each converter. input signals up to 16.27 khz may be converted. for maximum flexibility, the five adcs are arranged as two banks; adc1 and adc2 forming bank a, and adc3, adc4 and adc5 forming bank b. the characteristics of each bank, such as sampling rate, internal or external conversion, synchro- nization to the pwm block, operating modes, may be con- trolled independently. the adc registers of each bank may be loaded from an internal signal whose frequency may be pro- grammed as a precise fraction of the clkin frequency. alter- natively, the adcs may be updated by an external signal on the convst pin. there are two dedicated adc interrupts; one for each bank of converters that can be used to signal that the adcs of the particular bank have been updated. the adc system also contains a built-in calibration function that may be used to null any offsets within the adc converters. each adc channel may be placed in the calibration state indi- vidually or in combination with other channels. in addition, the adc system provides three multiplexer control pins that may be used in conjunction with an external multi- plexer to permit external signal expansion. there is a separate reference input for each bank of converters. however, the admc300 also provides a reference output that could be buffered and used as a reference source for either or both banks. input configuration the input to each adc may be applied to the admc300 in either a single-ended or differential configuration. in many cases, a single-ended configuration is easier to provide but the differential connection permits the reduction of common-mode noise from the input signal. each adc input may be config- ured for single-ended or differential inputs as appropriate, completely independent of the other channels. figure 6 illus- trates a typical differential configuration for the inputs of one adc channel of the admc300. the input signals are applied to pins vx and vxn (for example v1 and v1n). for correct operation and maximum input dynamic range, the inputs sig- nals should be centered on the reference voltage level, v ref . therefore, the signal applied to the vx pin should be v in + v ref , where v in is the analog input voltage. the corresponding signal applied to the inverting terminal of the differential input, vxn, is then ? in + v ref so that the differential signal applied to the adc input is actually 2 v in . the input rc combination of 100 ? and 0.047 f provides a first-order low-pass antialiasing filter with a cutoff frequency of 34 khz. an advantage to sigma-delta adcs is that the initial (analog) signal filtering required for antialiasing is much more modest than that required by other adcs. with the sigma-delta adc, the input filter needed for the analog signal only has to cut off at one-half of the modulator frequency, rather t han the lower effective sampling frequency. for the admc300, the modulator runs 64 times faster than the sampling frequency. thus for a 32.5 khz sampling rate, the modulator frequency is 2.08 mhz, meaning the needed cutoff for the analog input signal is 1.04 mhz. therefore, a simple first order filter, such as the rc filter shown in figure 6, which provides a more than 30 db attenuation to signals above 1 mhz (3 db at 34 khz) is ade- quate. the additional antialiasing band limiting required by the nyquist criterion for the 32.5 khz sampling rate (a cutoff of 16.25 khz) is supplied by the high order sinc filter in the digital domain. v in + v ref admc300 vxn refina refinb 0.1 f 0.047 f 0.0047 f vx v in + v ref v ref 0.047 f 100 100 figure 6. differential configuration for adc input of admc300 v in + v ref admc300 vxn refina refinb 0.1 f 0.047 f vx v ref 100 figure 7. single-ended configuration for adc input of admc300 v ref 0.1 f admc300 vref vxn refina refinb 0.1 f &
/(     
   
  2($11
admc300 C14C rev. b the corresponding configuration for single-ended operation is shown in figure 7, where the inverting input is now tied directly to the reference voltage level. the noninverting input is v in + v ref . an antialiasing filter with a cutoff at 34 khz is included on this input. clearly, the differential input voltage swing in this con- figuration is half that of the differential configuration. there- fore, when operating in single-ended mode, the input voltage, v in , may be twice as large as that when operating differentially. to ensure correct operation, a 0.1 f, high-quality capacitor must be included at the reference input pins. a 0.1 f capaci- tor should also be used at the vref pin, even if external refer- ences are used. in both figures 6 and 7, it is assumed that an external precision reference is used to provide the reference voltage level, v ref . for optimum operation, a high-performance 2.5 v reference such as the ad580 is recommended. this reference is applied directly to both input reference pins, refina and refinb, and is also applied to any external bias circuitry used to produce the adc input signals. for a lower cost solution, the admc300 also provides a reference output that may be used to provide the v ref signal. the reference output is available at the vref pin. for correct operation, a 0.1 f capacitor is required at this pin even if the internal reference is not used. in addition, it is rec- ommended that the v ref signal be buffered in a unity-gain stage prior to use, as shown in figure 8. of c ourse, since there are two separate reference inputs, pins refina and refinb, the two banks of adcs may be run differently, if required. adc register update the sigma-delta converters of the admc300 operate at a highly oversampled rate. a number of control bits in the adcctrl register are used to control when and how data is latched into the adc data registers of each bank. the data registers of each bank may be latched at a regular rate based on either an internal or an external convert start signal. bits 0? of the adcctrl register determine whether the convert start signal is internal or external. bit 0 controls the operation of bank a and bit 1 controls the operation of bank b. if either of these bits is set to 1, the data registers of the corresponding adc bank are latched within two clkin cycles of the occur- rence of a rising edge on the convst pin (pio9). alterna- tively, if either bit is set to zero, internal mode is selected and the adcs of the particular bank are updated at a regular rate, determined by the contents of the appropriate adc sample frequency division register, adcdiva or adcdivb. bits 2? of the adcctrl register can be used to place the adc banks in an alternative read mode. the read mode is enabled by setting these bits to 1, effectively disabling the con- vert start mode. in the read mode, the adc registers of the particular bank are continuously updated at a rate equal to half the dsp clock rate, so that data is effectively available on de- mand. bit 2 of the adcctrl register is used to place adc bank a in read mode, while bit 3 is used for bank b. adc sample rate selection internal convert start mode is selected by clearing bits 0 and 2 of the adcctrl register for bank a and bits 1 and 3 for bank b. in this mode, the adc data registers are updated at a regu- lar rate that is determined by the adc clock divide registers, adcdiva and adcdivb. therefore, each bank can be con- figured for independent update rates by writing different values to the two registers. when bank a and bank b are configured for independent update rates, it is important that the refina and refinb pins are driven by separate voltage reference sources to avoid excessive crosstalk between banks. the adcdiva and adcdivb registers are 6-bit registers aligned in bits 6?1 and the value written to these registers is used to divide the clkin frequency to provide the adc update rate. a 12-bit value is written to these registers, but since bits 0? are ignored, the value should be an integer multiple of 64 or 0x040. the result- ant adc update rates for banks a and b may be expressed as: f s , a = f clkin adcdiva f s , b = f clkin adcdivb where f clkin is the clkin frequency, equal to half the dsp instruction rate. therefore, writing a value of 0x180 (= 384) gives an adc update rate of 32.55 khz with a clkin frequency of 12.5 mhz. the maximum value that can be written to these registers is 0xfc0, corresponding to an update rate of 3.1 khz. since the maximum update rate is limited to 32.55 khz, the per- missible range of adc divide values is 0x180 to 0xfc0 in steps of 0x040. each adc channel contains an input modulator that oversam ples the input signal at a high rate. the modulator sample frequency is automatically set by the internal adc control to be exactly 64 times the adc update rate determined by the adc divide registers. this corresponds to an oversample ratio of 64. there- fore, in the case where adcdiva = 0x180, the input modulators of adc bank a sample the input signal at 2.08 mhz and the data registers adc1 and adc2 are updated at the 32.55 khz rate. synchronization of adc and pwm systems in motor control applications, it is advantageous to synchronize the operation of the adc system to the pwm pulse generation. the admc300 permits separate control of such synchroniza- tion for each adc bank and permits sophisticated definition of the particular way that the adc and pwm systems are synchro- nized. operation of bank a of the adc may be synchronized to the pwm by setting bit 7 of the adcctrl register. similarly, setting bit 8 of the adcctrl register enables synchronization of bank b to the pwm. at its simplest, the adc and pwm systems may be programmed to operate at the same frequency and be synchronized to one another so that the adc data registers are automatically updated at the start of each pwm period. this mode of operation is illustrated in figure 9(a) and is enabled by writing identical values to the pwm period register, pwmtm, and the adc divide register, adcdiva or adcdivb. synchronization is subsequently enabled by setting bit 7 (for bank a) or bit 8 (for bank b) of the adcctrl register. additionally, a separate control register, adcsync may be used to phase shift the update of the adc registers to some suitably defined instant within the pwm period. in this mode, the frequencies of the pwm and adc register updating are still the same but phase shifted relative to one another. this mode is illustrated in figure 9 (b). again, the pwm period register and adc divide registers are loaded with the same value. however, the offset of the adc update within the pwm period is programmed using the adcsync register. the adcsync
admc300 C15C rev. b register is a 7-bit register so that the adc sample period is effectively subdivided into 128 equal time slices. the value written to the adcsync register is the number of such time slices before the pwmsync pulse that the convst pulse is active. in other words, the occurrence of the convst pulse lags the pwmsync pulse of figure 9 (b) by a time, t offset , that can be expressed as a fraction of the adc update period: t offset = (128 ? adcsync ) 128 adcdivn f clkin ? ? ? ? ? ? therefore, for the case where adcdiva is 0x180 and adcsync is 0x060, the convst pulse will lag the pwmsync p ulse by a quarter of the adc update period, or 7.68 s, with a 12.5 mhz clkin. the ability to phase shift the adc update relative to the pwmsync pulse is available only in single update mode of the pwm. it is also possible to operate the adcs at a faster update rate than the pwm switching frequency and still maintain synchro- nism, as illustrated in figure 9 (c). in this example, the value written to the adcdiv registers is three times larger than the value written to the pwmtm register, so that the adc update rate is three times faster than the pwm switching frequency. synchronism is maintained by setting bits 7 and 8 of the adcctrl register. in addition, it is possible to introduce a phase shift between the adc update and pwmsync pulses while operating at different frequencies, as illustrated by figure 9 (d). the offset is defined by the adcsync register as a fraction of the adc update period in an identical manner to before. adc transfer characteristics each adc converter of the admc300 consists of an input modulator stage and a decimation filter stage that produces the final conversion result. the output of the decimation filters are 16-bit, left-aligned, two s complement representation of the input signal, v in . the ideal adc transfer characteristics for both single-ended and differential modes are shown in figure 10. the transfer characteristics of the adc when operated in the differential configuration are shown in figure 10 (a) and for the single-ended configuration in figure 10 (b). the peak-peak input voltage is 4 v. the output code of the adcs is typically given by: adcx = 10,600 2.5 v refin ? ? ? ? ? ? vx ? vxn () analog input 3.5 v v ref = 2.5 v 1.5v 0xad30 0x0000 0x52d0 v1n v1 adc code analog input 4.5 v v ref = 2.5 v 0.5v 0xad30 0x0000 0x52d0 v1n v1 adc code (a) (b) figure 10. (a) typical transfer characteristic of the adc in differential input configuration (b) typical transfer characteristic of the adc in single-ended pwmtm pwmcha pwmsync ah convst pwmsync ah convst pwmsync ah convst convst ah pwmsync pwmtm/3 (a) (b) (c) (d) t offset pwmtm/3 pwmtm pwmcha pwmtm pwmcha pwmcha pwmtm t offset figure 9. (a) synchronization of adc and pwm at same frequency with no offset, (b) synchronization of adc and pwm at same frequency with offset, (c) synchronization of adc and pwm with no offset and adc update at three times the pwm frequency (d) synchronization of adc and pwm at different frequencies with offset (pwm is operating in single update mode)
admc300 C16C rev. b adc group delay the digital filters of the adcs carry out two important func- tions. first, they remove the out-of-band quantization noise, which has been suitably shaped by the noise-shaping circuits of the input modulator stages. the digital filters then decimate the high frequency bitstream from the modulators to a lower rate 16-bit word. the lower rate is set by the adc divide registers for the respective adc banks as described previously. the antialiasing decimation filter may be modeled by the z-domain transfer function: h sinc ( z ) = 1 64 1 ? z ? 64 1 ? z ? 1 ? ? ? ? ? ? ? ? ? ? ? ? ? ? 3 associated with the sinc filters is a group delay that may be approximated by: t = 1. 5 f s where f s is the update rate of the particular adc channel. in order to minimize the impact of the group delay on the overall performance of the control system, it is advantageous to over- sample the adcs at a rate faster than the pwm frequency. adc calibration the adc system of the admc300 has a calibration feature that may be used to null any offsets in the adc channels. there is a 5-bit adc calibration register, adccal that has a dedi- cated bit for each adc channel. setting the appropriate bit of the adccal register will place the respective adc channel in the of fset calibration state. bit 0 controls adc1, bit 1 con- trols adc2, etc. when the appropriate bit of the adccal register is set, the two input pins associated with that adc chan- nel are effectively disconnected from the pins of the admc300 and connected internally to the reference voltage. after w ait- ing for the settling time of the decimation filters, the resultant adc code is a measure of the offset for that particular adc channel. this number should be saved in memory and used to correct all further measurements from that channel. adc interrupt generation two dedicated interrupts are associated with the adc system of the admc300, one for each of the adc banks. the inter- rupts are generated after the adc data registers of the particu- lar bank have been updated by either an internal or external convst pulse. interrupts are not generated when the adcs are in the read mode. there are separate interrupt vector loca- tions associated with each of the interrupt sources. the adc bank a interrupt is the highest priority interrupt with its vector address at program memory location 0x0030. the bank b interrupt is the third highest priority interrupt with a vector address of 0x0038. each interrupt has a four word space in the vector table. the sequencing and masking of these interrupts is managed by the programmable interrupt controller (pic) block described later. adc multiplexer control the admc300 has three digital output pins, mux2, mux1 and mux0, that can be used to drive an external multiplexer to feed additional analog inputs to the adcs if required. using these control lines, up to eight analog signals could be exter- nally multiplexed into each adc channel, allowing expansion up to 40 analog inputs. the state of the three multiplexer pins is directly controlled from the adcctrl register, using bits 4 6. bit 4 of the adcctrl register directly controls the mux0 pin, so that setting this bit will place a hi level on the mux0 pin. similarly, bit 5 directly controls the mux1 pin and bit 6 controls the mux2 pin. because of the finite impulse response of the decimation filters of the adcs, it is usually only slower dynamic signals that are multiplexed into the adcs. in a typical motor control system, such signals may comprise the dc link voltage, the output of various temperature sensors, reference inputs, etc. adc status because of the dynamic characteristics of the decimation filters of the sigma-delta converters, it is necessary to allow the impulse response of the filters to decay before meaningful, accurate data is available. there is a one-bit status register, adcstat, in the admc300 that indicates whether or not valid data is available from the adc. bit 0 of the adcstat register is asserted while the decimation filters are settling to indicate that data is not yet valid. this busy bit can be pro- grammed to represent the status of the decimation filters of either bank a or bank b by programming bit 9 of the adcctrl register. the busy bit will go active for four adc sample periods any time that adcctrl, adccal or adcsync are written to. if bit 9 of the adcctrl register is cleared, the busy bit will go active any time adcdiva is written to, and the four adc sample period width of the busy pulse will be four adc bank a sample periods. if bit 9 of the adcctrl register is set, the busy bit will go active any time the adcdivb register is written to, and the four adc sample period width of the busy pulse will be four adc bank b sample periods. it is still possible to read the adc data registers while the busy signal is asserted. however, care must be taken in the interpre- tation of such data. adc power-down and reset features the adc section of the admc300 has certain power-down features that may be used to reduce the overall power consump- tion of the part. each bank of the adc system may be individually powered down if all channels of that bank are not used in a par- ticular application. setting bit 10 of the adcctrl register will power down the input modulators of both adc channels of adc bank a. similarly, setting bit 11 of the adcctrl register will power down the three adc channels of bank b. clearing these bits will enable the input modulators of the respective banks. on pow er-up, both bits 10 and 11 of the adcctrl register are set by default, so that all five input modulator stages are disabled. to operate the required adc channels, the appropriate bits in the adcctrl register must be cleared. in addition, setting bit 12 of the adcctrl register will power down the internal reference circuitry. further power reduction is possible if this reference circuitry is powered down. however, this bit has an effect only if both adc banks are also powered down. clearing bit 12 of the adcctrl register will enable the internal reference circuitry. it is also possible to force a reset of all five input modulators of the adc system by setting bit 14 of the adcctrl register. setting bit 15 of the adcctrl register will force a reset of the decimation filters in all five adc channels. in order to come out of input modulator reset or decimation filter reset, the respective bit must be cleared. on power-up, these bits are
admc300 C17C rev. b cleared so that both the modulators and the decimation filters come up in the normal mode. it is recommended that prior to use, a full reset be performed. adc registers the composition of all the data registers associated with the adc system of the admc300 is shown at the end of the data s heet. the reset values are shown for certain bits, where appropriate. three-phase pwm controller the pwm generator block of the admc300 is a flexible, programmable, three-phase pwm waveform generator that can be programmed to generate the required switching patterns to drive a three-phase voltage source inverter for ac induction (acim) or permanent magnet synchronous (pmsm) motor control. in addition, the pwm block contains special functions that considerably simplify the generation of the required pwm switching patterns for control of the electronically commutated motor (ecm) or brushless dc motor (bdcm). the pwm generator produces three pairs of pwm signals on the six pwm output pins (ah, al, bh, bl, ch and cl). the six pwm output signals consist of three high side drive signals (ah, bh and ch) and three low side drive signals (al, bl and cl). the polarity of the generated pwm signals may be programmed by the pwmpol pin, so that either active hi or active lo pwm patterns can be produced by the admc300. the switching frequency, dead time and minimum pulsewidths of the generated pwm patterns are programmable using re- spectively the pwmtm, pwmdt and pwmpd reg isters. in addition, three duty-cycle control registers (pwmcha, pwmchb and pwmchc) directly control the duty cycles of the three pairs of pwm signals. each of the six pwm output signals can be enabled or disabled by separate output enable bits of the pwmseg register. in addition, three control bits of the pwmseg register permit crossover of the two signals of a pwm pair for easy control of ecm or bdcm. in crossover mode, the pwm signal destined for the high side switch is diverted to the complementary low- side output and the signal destined for the low side switch is diverted to the corresponding high side output signal. in many applications, there is a need to provide an isolation barrier in the gate-drive circuits that turn on the power devices of the inverter. in general, there are two common isolation techniques, optical isolation using opto-couplers and trans- former isolation using pulse transformers. the pwm controller of the admc300 permits mixing of the output pwm signals with a high frequency chopping signal to permit easy interface to such pulse transformers. the features of this gate-drive chopping mode can be controlled by the pwmgate register. there is an 8-bit value within the pwmgate register that directly controls the chopping frequency. in addition, high frequency chopping can be independently enabled for the high side and the low side outputs using separate control bits in the pwmgate register. the pwm generator is capable of operating in two distinct modes, single update mode or double update mode. in single update mode the duty cycle values are programmable only once per pwm period, so that the resultant pwm patterns are sym- metrical about the midpoint of the pwm period. in the double update mode, a second updating of the pwm duty cycle values is implemented at the midpoint of the pwm period. in this mode, it is possible to produce asymmetrical pwm patterns, that produce lower harmonic distortion in three-phase pwm inverters. this technique also permits closed loop controllers to change the average voltage applied to the machine windings at a faster rate and so permits faster closed loop bandwidths to be achieved. the operating mode of the pwm block (single or double update mode) is selected by a control bit in the modectrl register. the pwm generator of the admc300 also provides an output pulse on the pwmsync pin that is synchronized to the pwm switching frequency. in single update mode a pwmsync pulse is produced at the start of each pwm period. in double update mode, an additional pwmsync pulse is produced at the mid- point of each pwm period. the width of the pwmsync pulse is programmable through the pwmsyncwt register. the pwm signals produced by the admc300 can be shut off in a number of different ways. first, there is a dedicated asyn- chronous pwm shutdown pin, pwmtrip , that, when brought lo, instantaneously places all six pwm outputs in the off state (as determined by the state of the pwmpol pin). in addi- tion, each of the pio lines of the admc300 (pio0 to pio11) can be configured to act as an additional pwm shutdown. by setting the appropriate bit in the piopwm register, the corre- sponding pio line acts as an asynchronous pwm shutdown source in a manner identical to the pwmtrip pin. these two hardware shutdown mechanisms are asynchronous so that the associated pwm disable circuitry does not go through any clocked logic, thereby ensuring correct pwm shutdown even in the event of a loss of the dsp clock. in addition to the hardware shutdown features, the pwm system may be shut down in soft- ware by writing to the pwmswt register. status information about the pwm system of the admc300 is available to the user in the sysstat register. in particular, the state of both the pwmtrip and the pwmpol pins is avail- able, as well as a status bit that indicates whether operation is in the first half or the second half of the pwm period. a functional block diagram of the pwm controller is shown in figure 11. the generation of the six output pwm signals on pins ah to cl is controlled by four important blocks: ? the three-phase pwm timing unit, which is the core of the pwm controller, generates three pairs of complemented and dead-time-adjusted center-based pwm signals. ? the output control unit allows the redirection of the outputs of the three-phase timing unit for each channel to either the high side or the low side output. in addition, the output con- trol u nit allows individual enabling/disabling of each of the six pwm output signals. ? the gate drive unit provides the correct polarity output pwm signals based on the state of the pwmpol pin. the gate drive unit also permits the generation of the high fre- quency chopping frequency and its subsequent mixing with the pwm signals. ? the pwm shutdown controller takes care of the various pwm shutdown modes (via the pwmtrip pin, the pio lines or the pwmswt register) and generates the correct reset signal for the timing unit.
admc300 C18C rev. b the pwm controller is driven by a clock at the same frequency as the dsp instruction rate, clkout, and is capable of gener- ating two interrupts to the dsp core. one interrupt is generated on the occurrence of a pwmsync pulse and the other is gen- erated on the occurrence of any pwm shutdown action. ah pwmcha (15 0) pwmchb (15 0) pwmchc (15 0) pwmseg (8 0) pwmgate (8 0) three-phase pwm timing unit output control unit clk sync reset sync or pio pwm detect gate drive unit clk pol clkout pwmtm (15 0) pwmdt (9 0) pwmpd(9 0) pwmsyncwt(7 0) modectrl (6) pwmswt (0) piopwm (11 0) al bh bl ch cl pwmtrip pwmsync pwmpol pio0 pio11 to interrupt controller : : pwm configuration registers pwm duty cycle registers pwmsync pwmtrip pwm shutdown controller figure 11. pwm controller overview three-phase timing unit the 16-bit three-phase timing unit is the core of the pwm controller and produces three pairs of pulsewidth modulated signals with high resolution and minimal processor overhead. the outputs of this timing unit are active lo such that a low level is interpreted as a command to turn on the associated power device. there are four main configuration registers (pwmtm, pwmdt, pwmpd and pwmsyncwt) that determine the fundamental characteristics of the pwm outputs. in addition, the operating mode of the pwm (single or double update mode) is selected by bit 6 of the modectrl register. these registers, in conjunction with the three 16-bit duty cycle registers (pwmcha, pwmchb and pwmchc), control the output of the three-phase timing unit. pwm switching frequency, pwmtm register the pwm switching frequency is controlled by the pwm pe- riod register, pwmtm. the fundamental timing unit of the pwm controller is t ck = 1/f clkout where f clkout is the clkout frequency (dsp in struction rate). therefore, for a 25 mhz clkout, the fundamental time increment is 40 ns. the value written to the p wmtm register is effectively the number of t ck clock increments in half a pwm period. the required pwmtm value as a function of the desired pwm switching frequency (f pwm ) and is given by: pwmtm = f clkout 2 f pwm = f clkin f pwm therefore, the pwm switching period, t s , can be written as: t s = 2 t ck pwmtm for example, for a 25 mhz clkout and a desired pwm switching frequency of 10 khz (t s = 100 s), the correct value to load into the pwmtm register is: pwmtm = 25 10 6 2 10 10 3 = 1250 the largest value that can be written to the 16-bit pwmtm register is 0xffff = 65,535, which corresponds to a minimum pwm switching frequency of: f pwm , min = 25 10 6 2 65,535 = 190.74 hz for a clkout frequency of 25 mhz. pwm switching dead time, pwmdt register the second important parameter that must be set up in the initial configuration of the pwm block is the switching dead time. this is a short delay time introduced between turning off one pwm signal (say, ah) and turning on the complementary signal, al. this short time delay is introduced to permit the power switch being turned off (in this case, ah) to completely recover its blocking capability before the complementary switch is turned on. this time delay prevents a potentially destructive short-circuit condition from developing across the dc link capacitor of a typical voltage source inverter. the dead time is controlled by the 10-bit, read/write pwmdt register. there is only one dead-time register that controls the dead time inserted into all three pairs of pwm output signals. the dead time, t d , is related to the value in the pwmdt regis- ter by: t d = pwmdt 2 t ck = 2 pwmdt f clkout therefore, a pwmdt value of 0x00a (= 10), introduces an 800 ns delay between the turn-off on any pwm signal (say, ah) and the turn-on of its complementary signal (al). the amount of the dead time can therefore be programmed in increments of 2t ck (or 80 ns for a 25 mhz clkout). the pwmdt register is a 10-bit register so that its maximum value is 0x3ff (= 1023), corresponding to a maximum programmed dead time of: t d , max = 1023 2 t ck = 1023 2 40 10 9 = 81.84 s for a clkout rate of 25 mhz. obviously, the dead time can be programmed to be zero by writing 0 to the pwmdt register. pwm operating mode, modectrl and sysstat regis ters the pwm controller of the admc300 can operate in two distinct modes; single update mode and double update mode. the operating mode of the pwm controller is determined by the state of bit 6 of the modectrl register. if this bit is cleared the pwm operates in the single update mode. setting bit 6 places the pwm in the double update mode. by default, following either a peripheral reset or power-on, bit 6 of the modectrl register is cleared so that the default operating mode is single update mode.
admc300 C19C rev. b in single update mode, a single pwmsync pulse is produced in each pwm period. the rising edge of this signal marks the start of a new pwm cycle and is used to latch new values from the pwm configuration registers (pwmtm, pwmdt, pwmpd and pwmsyncwt) and the pwm duty cycle registers (pwmcha, pwmchb and pwmchc) into the three-phase timing unit. in addition, the pwmseg register is also latched into the output control unit on the rising edge of the pwm- sync pulse. in effect, this means that the characteristics and resultant duty cycles of the pwm signals can be updated only once per pwm period at the start of each cycle. the result is that pwm patterns that are symmetrical about the midpoint of the switching period are produced. in double update mode, there is an additional pwmsync pulse produced at the midpoint of each pwm period. the rising edge of this new pwmsync pulse is again used to latch new values of the pwm configuration registers, duty cycle registers and the pwmseg register. as a result it is possible to alter both the characteristics (switching frequency, dead time, minimum pulsewidth and pwmsync pulsewidth) as well as the output duty cycles at the midpoint of each pwm cycle. consequently, it is possible to produce pwm switching patterns that are no longer symmetrical about the midpoint of the period (asymmetrical pwm patterns). in double update mode, it may be necessary to know w hether operation at any point in time is in either the first half or the second half of the pwm cycle. this information is provided by bit 3 of the sysstat register, which is cleared during opera- tion in the first half of each pwm period (between the rising edge of the original pwmsync pulse and the rising edge of the new pwmsync pulse introduced in double update mode). bit 3 of the sysstat register is set during operation in the second half of each pwm period. this status bit allows the user to make a determination of the particular half-cycle during implementation of the pwmsync interrupt service routine, if required. the advantage of double update mode is that lower harmonic voltages can be produced by the pwm process and faster con- trol bandwidths are possible. however, for a given pwm switching frequency, the pwmsync pulses occur at twice the rate in the double update mode. since new duty cycle values must be computed in each pwmsync interrupt service routine, there is a larger computational burden on the dsp in double update mode. width of the pwmsync pulse, pwmsyncwt register the pwm controller of the admc300 produces an output pwm synchronization pulse at a rate equal to the pwm switch- ing frequency in single update mode and at twice the pwm frequency in the double update mode. this pulse is available for external use at the pwmsync pin. the width of this pwms ync pulse is programmable by the 8-bit read/write pwmsyn cwt register. the width of the pwmsync pulse, t pwmsync , is given by: t pwmsync = t ck ( pwmsyncwt + 1) so that the width of the pulse is programmable from t ck to 256t ck (corresponding to 40 ns to 10.24 s for a clkout rate of 25 mhz). following a reset, the pwmsyncwt register contains 0x27 (= 39) so that the default pwmsync width is 1.6 s. pwm duty cycles, pwmcha, pwmchb, pwmchc registers the duty cycles of the six pwm output signals on pins ah to cl are controlled by the three 16-bit read/write duty cycle registers, pwmcha, pwmchb and pwmchc. the integer value in the register pwmcha controls the duty cycle of the signals on ah and al, pwmchb controls the duty cycle of the signals on bh and bl and pwmchc controls the duty cycle of the signals on ch and cl. the duty cycle registers are programmed in integer counts of the fundamental time unit, t ck , and define the desired on-time of the high-side pwm sig- nal produced by the three-phase timing unit over half the pwm period. the switching signals produced by the three-phase timing unit are also adjusted to incorporate the pro grammed dead time value in the pwmdt register. the three-phase timing unit produces active lo signals so that a lo level corresponds to a command to turn on the associated power device. a typical pair of pwm outputs (in this case for ah and al) from the timing unit are shown in figure 12 for operation in single update mode. all illustrated time values indicate the integer value in the associated register and can be converted to time by simply multiplying by the fundamental time increment, t ck . first, it is noted that the switching patterns are perfectly symmetrical about the midpoint of the switching period in this single update mode since the same values of pwmcha, pwmtm and pwmdt are used to define the signals in both half cycles of the period. it can be seen how the programmed duty cycles are adjusted to incorporate the desired dead time into the resultant pair of pwm signals. clearly, the dead time is incorporated by moving the switching instants of both pwm signals (ah and al) away from the instant set by the pwmcha register. both switching edges are moved by an equal amount (pwmdt t ck ) to preserve the symmetrical output patterns. also shown is the pwmsync pulse whose width is set by the pwmsyncwt register and bit 3 of the sysstat register that indicates whether operation is in the first or second half cycle of the pwm period. pwmsync ah al pwmcha pwmcha 2 pwmdt pwmsyncwt + 1 2 pwmdt sysstat (3) pwmtm pwmtm figure 12. typical pwm outputs of three-phase timing unit in single update mode (active lo waveforms) the resultant on-times of the pwm signals in figure 12 may be written as: t ah = 2 ( pwmcha pwmdt ) t ck t al = 2 ( pwmtm pwmcha pwmdt ) t ck and the corresponding duty cycles are: d ah = t ah t s = pwmcha pwmdt pwmtm
admc300 C20C rev. b d al = t al t s = pwmtm pwmcha pwmdt pwmtm the minimum permissible t ah and t al values are zero, corre- sponding to a 0% duty cycle. in a similar fashion, the maximum value is t s , corresponding to a 100% duty cycle. the output signals from the timing unit for operation in double update mode are shown in figure 13. this illustrates a com- pletely general case where the switching frequency, dead time and duty cycle are all changed in the second half of the pwm period. of course, the same value for any or all of these quanti- ties could be used in both halves of the pwm cycle. however, it can be seen that there is no guarantee that symmetrical pwm signals will be produced by the timing unit in double update mode. additionally, it is seen that the dead time is inserted into the pwm signals in the same way as in the single update mode. pwmcha 2 2 pwmdt 1 2 pwmdt 2 pwmsyncwt 2 + 1 pwmcha 1 pwmtm 1 pwmtm 2 pwmsyncwt 1 + 1 ah al pwmsync sysstat (3) figure 13. typical pwm outputs of three-phase timing unit in double update mode (active lo waveforms) in general the on-times of the pwm signals in double update mode can be defined as: t ah = ( pwmcha 1 + pwmcha 2 pwmdt 1 pwmdt 2 ) t ck t al = ( pwmtm 1 + pwmtm 2 pwmcha 1 pwmcha 2 pwmdt 1 pwmdt 2 ) t ck where the subscript 1 refers to the value of that register during the first half cycle and the subscript 2 refers to the value during the second half cycle. the corresponding duty cycles are: d t t pwmcha pwmcha pwmdt pwmdt pwmtm pwmtm ah ah s == + + ( ) () 1212 12 d t t pwmtm pwmtm pwmcha pwmcha pwmdt pwmdt pwmtm pwmtm al al s == + + ( ) () 12 1 212 12 since for the completely general case in double update mode, the switching period is given by: t s = ( pwmtm 1 + pwmtm 2 ) t ck again, the values of t ah and t al are constrained to lie between zero and t s . pwm signals similar to those illustrated in figure 12 and figure 13 can be produced on the bh, bl, ch and cl outputs by programming the pwmchb and pwmchc registers in a manner identical to that described for pwmcha. the pwm controller does not produce any pwm outputs until all of the pwmtm, pwmcha, pwmchb and pwmchc registers have been written to at least once. once these registers have been written, internal counting of the timers in the three- phase timing unit is enabled. writing to the pwmtm register starts the internal timing of the main pwm timer. pro- vided the p wmtm regi ster is written prior to the pwmcha, pwmchb and pwmchc registers in the initialization, the first pwmsync pulse and interrupt (if enabled) appear 1.5 t ck pwmtm seconds after the initial write to the pwmtm register in single update mode. in double update mode, the first pwmsync pulse appears after pwmtm t ck seconds. effective pwm resolution in single update mode, the same value of pwmcha, pwmchb and pwmchc is used to define the on-times in both half cycles of the pwm period. as a result the effective resolution of the pwm generation process is 2t ck (or 80 ns for a 25 mhz clkout), since incrementing one of the duty cycle registers by one changes the resultant on-time of the associated pwm signals by t ck in each half period (or 2t ck for the full period). in double update mode, improved resolution is possible since different values of the duty cycle registers are used to define the on-times in both the first and second halves of the pwm pe- riod. as a result, it is possible to adjust the on-time over the whole period in increments of t ck . this corresponds to an effective pwm resolution of t ck in double update mode (or 40 ns for a 25 mhz clkout). the achievable pwm switching frequency at a given pwm resolution is tabulated in table v. table v. achievable pwm resolution in single and double update modes single update mode double update mode resolution pwm frequency pwm frequency (bits) (khz) (khz) 8 48.8 97.6 9 24.4 48.8 10 12.2 24.4 11 6.1 12.2 12 3.05 6.1 minimum pulsewidth, pwmpd register in many power converter switching applications, it is desirable to eliminate pwm switching signals below a certain width. it takes a certain finite time to both turn on and turn off modern power semiconductor devices. therefore, if the width of any of the pwm signals goes below some minimum value, it may be desirable to completely eliminate the pwm switching for that particular cycle. the allowable minimum on-time for any of the six pwm out- puts over half a pwm period that can be produced by the pwm controller may be programmed using the pwmpd regis- ter. the minimum on-time is programmed in increments of t ck so that the minimum on-time that will be produced over any half pwm period, t min , is related to the value in the pwmpd register by: t min = pwmpd t ck so that a pwmpd value of 0x002 defines a permissible mini- mum on-time of 80 ns for a 25 mhz clkout.
admc300 C21C rev. b in each half cycle of the pwm, the timing unit checks the on- time of each of the six pwm signals. if any of the times is found to be less than the value specified by the pwmpd regis- ter, the corresponding pwm signal is turned off for the entire half period and its complementary signal is turned completely on. consider the example where pwmtm = 200, pwmcha = 5, pwmdt = 3, pwmpd = 10 with a clkout of 25 mhz and operation in single update mode. in this case, the pwm switch- ing frequency is 62.5 khz and the dead time is 240 ns. the permissible on-time of any pwm signal over one-half of any period is 400 ns. clearly, for this example, the dead-time adjusted on-time of the ah signal over half a pwm period is (5 3) 40 ns = 80 ns. this is less than the permissible value, so the timing unit will output a completely off (0% duty cycle) signal on ah. additionally, the al signal will be turned on for the entire half period (100% duty cycle). output control unit, pwmseg register the operation of the output control unit is controlled by the 9-bit read/write pwmseg register. this register controls two distinct features of the output control unit that are directly useful in the control of ecm or bdcm. the pwmseg register contains three crossover bits; one for each pair of pwm outputs. setting bit 8 of the pwmseg register enables the crossover mode for the ah/al pair of pwm signals, setting bit 7 enables crossover on the bh/bl pair of pwm signals and setting bit 6 enables crossover on the ch/cl pair of pwm signals. if crossover mode is enabled for any pair of pwm signals, the high-side pwm signal from the timing unit (ah, for example) is diverted to the associated low- side output of the output control unit so that the signal will ultimately a ppear at the al pin. of course, the corresponding low-side output of the timing unit is also diverted to the complementary high-side output of the output control unit so that the signal appears at the ah pin. following a reset, the three crossover bits are cleared so that the crossover mode is disabled on all three pairs of pwm signals. the pwmseg register also contains six bits (bits 0 to 5) that can be used to individually enable or disable each of the six pwm outputs. the pwm signal of the al pin is enabled by setting bit 5 of the pwmseg register, while bit 4 controls ah, bit 3 controls bl, bit 2 controls bh, bit 1 controls cl, and bit 0 controls the ch output. if the associated bit of the pwmseg register is set, the corresponding pwm output is disabled irrespective of the value of the corresponding duty cycle register. this pwm output signal will remain in the off state as long as the corresponding enable/disable bit of the pwmseg register is set. the implementation of this output enable function is implemented after the crossover function. following a reset, all six enable bits of the pwmseg register are cleared so that all pwm outputs are enabled by default. in a manner identical to the duty cycle registers, the pwmseg is latched on the rising edge of the pwmsync signal so that changes to this register only become effective at the start of each pwm cycle in single update mode. in double update mode, the pwmseg register can also be updated at the mid- point of the pwm cycle. in the control of an ecm only two inverter legs are switched at any time and often the high-side device in one leg must be switched on at the same time as the low-side driver in a second leg. therefore, by programming identical duty cycles values for two pwm channels (say pwmcha = pwmchb) and setting bit 7 of the pwmseg register to cross over the bh/bl pair of pwm signals, it is possible to turn on the high-side switch of phase a and the low-side switch of phase b at the same time. in the control of ecm, it is usual that the third inverter leg (phase c in this example) be disabled for a number of pwm cycles. this function is implemented by disabling both the ch and cl pwm outputs by setting bits 0 and 1 of the pwmseg register. this situation is illustrated in figure 14, where it can be seen that both the ah and bl signals are identical, since pwmcha = pwmchb and the crossover bit for phase b is set. in addition, the other four signals (al, bh, ch and cl) have been disabled by setting the appropriate enable/disable bits of the pwmseg register. for the situation i llustrated in figure 14, the appropriate value for the pwmseg register is 0x00a7. in normal ecm operation, each inverter leg is dis- abled for certain periods of time so that the pwmseg register is changed based on the position of the rotor shaft (motor com- mutation). ah al bh bl ch cl pwmtm pwmtm pwmcha = pwmchb pwmcha = pwmchb 2 pwmdt 2 pwmdt figure 14. example active lo pwm signals suitable for ecm control, pwmcha = pwmchb, crossover bh/bl pair and disable al, bh, ch and cl outputs. operation is in single update mode. gate drive unit, pwmgate register the gate drive unit of the pwm controller adds features that simplify the design of isolated gate drive circuits for pwm inverters. if a transformer-coupled power device gate drive amplifier is used then the active pwm signal must be ch opped at a high frequency. the 10-bit read/write pwmg ate register allows the programming of this high frequency chopping mode. the chopped active pwm signals may be required for the high- side drivers only, for the low-side drivers only or for both the high-side and low-side switches. therefore, independent con- trol of this mode for both high- and low-side switches is included with two separate control bits in the pwmgate register.
admc300 C22C rev. b typical pwm output signals with high frequency chopping enabled on both high-side and low-side signals are shown in figure 15. chopping of the high side pwm outputs (ah, bh and ch) is enabled by setting bit 8 of the pwmgate regis- ter. chopping of the low-side pwm outputs (al, bl and cl) is enabled by setting bit 9 of the pwmgate register. the high frequency chopping frequency is controlled by the 8-bit word (gdclk) placed in bits 0 to 7 of the pwmgate register. the period of this high frequency carrier is: t gdclk t chop ck = + () [] 41 and the chopping frequency is therefore an integral subdivision of the clkout frequency: f chop = f clkout 4 ( gdclk + 1) [] the gdclk value may range from 0 to 255, corresponding to a programmable chopping frequency rate from 24.4 khz to 6.25 mhz for a 25 mhz clkout rate. the gate drive fea tures must be programmed before operation of the pwm controller and typically are not changed during normal operation of the pwm controller. following a reset, all bits of the pwmgate register are cleared so that high frequency chopping is disabled, by default. pwmtm pwmtm [4 (gdclk+1) t ck ] 2 pwmdt 2 pwmdt pwmcha pwmcha ah al figure 15. typical active lo pwm signals with high fre- quency gate chopping enabled on both high side and low side switches (gdclk is integer equivalent of value in bits 0 to 7 of pwmgate register.) pwm polarity control, pwmpol pin the polarity of the pwm signals produced at the output pins ah to cl may be selected in hardware by the pwmpol pin. connecting the pwmpol pin to gnd selects active lo pwm outputs, such that a lo level is interpreted as a command to turn on the associated power device. conversely, connecting vdd to the pwmpol pin selects active hi pwm and the associated power devices are turned on by a hi level at the pwm outputs. there is an internal pull-up on the pwmpol pin, so that if this pin becomes disconnected (or is not con- nected), active hi pwm will be produced. the level on the pwmpol pin may be read from bit 2 of the sysstat regis- ter, where a zero indicates a measured lo level at the pwmpol pin. pwm shutdown in the event of external fault conditions, it is essential that the pwm system be instantaneously shut down in a safe fashion. a low level on the pwmtrip pin provides an in- stantaneous, asynchronous (independent of the dsp clock) shutdown of the pwm controller. all six pwm outputs are placed in the off state (as defined by the pwmpol pin). in addition, the pwmsync pulse is disabled. the pwmtrip pin has an internal pull-down resistor so that if the pin becomes discon nected the pwm will be disabled. the state of the pwmtrip pin can be read from bit 0 of the sysstat register. the 12 pio lines of the admc300 can also be configured to operate as pwm shutdown pins using the piopwm register. the 12-bit piopwm has a control bit for each pio line (bit 0 controls pio0 etc.). setting the control bit enables the corre- sponding pio line as a pwm shutdown pin. a low level on the pio line will then generate an instantaneous, asynchronous shutdown of the pwm system, in a manner identical to the pwmtrip pin. on power-up, and following a reset, all pio lines are configured as inputs, have pull-downs and are pro- grammed as pwm shutdown pins (piopwm = 0x0fff) so that the pwm is shut down. correct operation of the pwm is not possible without first correctly configuring the pio system. in addition, it is possible to initiate a pwm shutdown in soft- ware by writing to the 1-bit read/write pwmswt register. the act of writing to this register sets the bit in the pwmswt register and generates a pwm shutdown command in a manner identical to the pwmtrip or pio pins. a hardware trip has no effect on the pwmswt register. f ollowing a pwm shutdown, it is possible to read the pwmswt register to determine if the shutdown was generated by hardware or software. reading the pwmswt register automatically clears its contents. on the occurrence of a pwm shutdown command (either from the pwmtrip pin, the pio lines or the pwmswt register), a pwmtrip interrupt will be generated. in addition, internal timing of the three-phase timing unit of the pwm controller is stopped. following a pwm shutdown, the pwm can only be re-enabled (in a pwmtrip interrupt service routine, for ex- ample) by writing to all of the pwmtm, pwmcha, pwmchb and pwmchc registers. provided the external fault has been cleared and the pwmtrip or appropriate pio lines have re- turned to a hi level, internal timing of the three-phase timing unit resumes and new duty-cycle values are latched on the next pwmsync boundary. pwm registers the configuration of all registers of the pwm system are shown at the end of the data sheet. encoder interface unit the admc300 incorporates a powerful encoder interface block to incremental shaft encoders, which are often used for position feedback in high performance motion control systems. the en- coder inte rface unit (eiu) includes a 16-bit quadrature u p/down counter and has three dedicated pins on the admc300. the quadrature encoder signals are applied at the eia and eib pins and the optional zero pulse may be applied at the eizp pin. the encoder interface unit will operate correctly with input frequen- cies up to slightly less than a quarter of the clkin frequency (3.1 mhz for a 12.5 mhz clkin). the direction of counting of the quadrature counter is programmable. in addition, the actual direction of counting may be read from the eiu status register, eiustat. the eiu may be programmed to use the zero pulse to reset the quadrature encoder, if required. alternatively, the zero pulse can be ignored and the encoder quadrature counter is reset according to the contents of a maximum count register,
admc300 C23C rev. b eiumaxcnt. there is also a single north marker mode avail- able in which the encoder quadrature counter is reset only on the first zero pulse. both modes are enabled by dedicated con- trol bits in the eiu control register, eiuctrl. a status bit is set in the eiustat register on the first occurrence of the zero pulse. the encoder interface unit can also be made to implement some error checking functions. if the error checking mode is enabled, upon the occurrence of a zero pulse, the contents of the encoder counter register are compared with the expected value (0 or eiumaxcnt depending on the direction of rota- tion). if an encoder count error is detected (say due to a discon- nected encoder line), a status bit in the eiustat register is set and an eiu interrupt is generated. an additional status bit is provided in the eiustat register, which indicates the initialization state of the eiu. until the eiumaxcnt register is written to, the eiu is not initialized. three status bits in the eiustat register can also be read to read the state of the three eiu pins, eia, eib and eizp. the encoder interface unit of the admc300 contains a 16-bit loop timer that behaves in a manner similar to the program- mable interval timer of the dsp core. the loop timer consist of a timer register, period register and scale register so that it can be programmed to time-out and reload at appropriate intervals. a control bit in the eiuctrl register is used to enable/disable this loop timer. when this loop timer times out, an eiu inter- rupt is generated. this interrupt could be used to control the timing of speed and position control loops in high performance drives. the encoder interface unit also includes a high performance encoder event timer (eet) block that permits the accurate timing of successive events of the encoder inputs. the eet can be programmed to time the duration between up to 256 en coder pulses and can be used to enhance velocity estimation, particu- larly at low speeds of rotation. the information from the regis- ters of the eet block can be latched in two ways. in one mode, both the contents of the eiu quadrature count register, eiucnt and all relevant eet registers (eett and eetdeltat) are latched when the eiu loop timer times out. in the second mode, the act of reading the eiucnt register also simulta- neously latches the eet registers. the eet data latching mode is selected by a control bit in the eiuctrl register. encoder loop timer the eiu contains a 16-bit loop timer that is structured in a manner similar to the interval timer of the dsp core (tcount, tperiod and tscale registers). the corresponding regis- ters of the encoder loop timer are eiutimer, eiuperiod and eiuscale. the eiu loop timer is clocked at the clkin rate. the eiu loop timer can be used to generate periodic interrupts based on multiples of the clkin cycle times. the eiu loop timer is enabled by setting bit 5 of the eiuctrl register. when enabled, the 16-bit timer register (eiutimer) is decre- mented every n cycles, where n-1 is the scaling value stored in the 8-bit eiuscale register. when the value of the eiutimer register reaches zero an eiu interrupt is generated and the eiutimer register is reloaded with the 16-bit value in the eiuperiod register. the scaling feature of this timer, provided by the eiuscale register, allows the 16-bit timer to generate periodic interrupts over a wide range of periods. for a 12.5 mhz clkin rate (80 ns period), the timer can generate interrupts with periods of 80 ns up to 5.24 ms with a zero scale value (eiuscale = 0). when scaling is used, time periods can range up to 1.34 sec onds. the eiu interrupt can be masked in the picmask register. encoder interface structure and operation the functional block diagram of the entire encoder interface system of the admc300 is shown in figure 16. the encoder interface section consists of a 16-bit quadrature up/down counter, a 16-bit read/write eiucnt register that allows the up/down counter to be read by the dsp. t here is also a 16-bit read/ write eiumaxcnt register that must be written to initialize the encoder system. until the eiumaxcnt register has been written to, the encoder interface unit is not initialized and bit 2 of the eiustat register is set. the contents of the eiumaxcnt register are used in certain operating modes to reset the quadra- ture counter. the contents of the eiumaxcnt reg ister are also used for error checking of the eiu. operation of the en- coder interface is controlled by the 6-bit read/write eiuctrl register. typical encoder waveforms are illustrated in figure 17. the contents of the quadrature counter are updated on each edge of both encoder signals applied on the eia and eib pins. prior to application to the quadrature counter, these signals are synchro- nized to the clkin rate in input synchronization buffers. this eliminates the asynchronous nature of real world encoder signals prior to use in the encoder interface unit logic. encoder counter direction the direction of quadrature counting is determined by the rev bit (bit 0) of the eiuctrl register. if the rev bit is cleared, the signal at the eia pin is fed to the a input of the quadrature counter, and the eib pin is fed to the b input. thus, if the eia- encoder signal leads the eib signal (and therefore the a signal leads the b signal), the quadrature counter is incremented on each edge, as shown in figure 17. this (a signal leads the b signal) is defined as the forward direction of motion. setting bit 0 of the eiuctrl register causes the signal at the eia pin to be fed to the b input of the quadrature counter and the signal eib becomes the a input of the quadrature counter. therefore, if the eia signal leads the eib signal at the pins of the admc300, the a input to the quadrature counter will now lag the b input. this will be recognized as rotation in the reverse direction and the counter will be decremented on each quadrature pulse. following a reset, the rev bit is cleared. as shown in figure 16, the two encoder signals are used to derive a quadrature signal that is used, in conjunction with a direction bit, to increment or decrement the encoder counter and also the encoder event timer. the status of the direction signal is indicated at bit 1 of the eiustat register. while the encoder counter is incrementing, bit 1 is set. alternatively, when the encoder counter is decrementing, bit 1 of the eiustat register is cleared.
admc300 C24C rev. b encoder counter reset the zero bit (bit 1) of the eiuctrl register determines if the encoder zero marker is used to reset the up/down counter of the encoder interface. when bit 1 of the eiuctrl register is set, the zero marker signal is used to reset the up/down counter to zero (if moving in the forward direction) or to the value in the eiumaxcnt register (if moving in the reverse direction). the reset operation takes place on the next quadrature pulse after the zero marker has been recognized. in order to ensure correct encoder counting (no missing or spurious codes) the logic in the encoder counter latches the conditions (appropriate encoder edge) at which the first reset is performed. thereafter, irrespective of operating conditions, the encoder reset operation is always aligned with the same encoder edge. for example, if the first reset operation occurs on the rising edge of b and the encoder is moving in the forward direction, then all subsequent reset operations are aligned with the rising edge of the b signal (while moving in the forward direction) and on the falling edge of b for rotation in the reverse direction. in order to account for zero marker signals of different widths, the zero marker will be recognized as the rising edge of the eizp signal when moving in the forward direction. when moving in the reverse direction, the zero marker is recognized at the falling edge of the signal at the eizp pin. when the zero bit of the eiuctrl register is cleared, the zero marker is not used at all by the encoder interface circuitry. in this mode, the contents of the eiumaxcnt register are used as the reset value for the up/down counter. for example, for an n-line incremental encoder, the appropriate value to write to the eiumaxcnt register is 4n-1. therefore, for a 1024 line encoder, a value of 0x0fff (= 4095) would be writ- ten to the eiumaxcnt register. however, since absolute position information is not available in this mode, due to the absence of the zero marker, the full 16-bit range of the quadra- ture counter may be employed by writing a value of 0xffff to the eiumaxcnt register. following a reset, the zero bit is cleared. the value written to the eiumaxcnt register must be in the form 4n-1, where n is any integer. single north marker mode a further reset mode is available in the encoder interface unit called single north marker mode . this mode is enabled by set- ting bit 2 (snm) of the eiuctrl register. for this mode to operate, the zero bit (bit 1) of the eiuctrl register must also be set. in this mode the eiucnt register is reset (to zero or eiumaxcnt depending on direction) only on the first occurrence of the zero marker. subsequently, the eiucnt regis- ter is reset by the natural roll-over to zero or the value in the eiumaxcnt register. following a reset, this snm bit is cleared. bit 6 of the eiustat register is used to signal the first occur- rence of a zero marker. when the first zero marker has been recognized by the eiu, bit 6 of the eiustat register is set. encoder error checking error checking in the eiu is enabled by setting bit 3 (mon) of the eiuctrl register. the zero bit of the eiuctrl regis- ter must also be set for error checking to be enabled. in this mode, the contents of the eiucnt register are compared with the expected value (zero or eiumaxcnt depending on direction) when the zero marker is detected. if a value other than the ex- pected value is detected, an error condition is generated by setting bit 0 of the eiustat register and triggering an eiu interrupt. since the eiu interrupt can be initiated by both this error checking function and the time-out of the encoder loop timer, this status bit must be read to determine the source of the interrupt if both are possible. obviously if the encoder loop timer is disabled, the eiu interrupt can only be generated by this error-checking function. this eiu interrupt is also managed and may be masked by the programmable interrupt controller (pic) block. the encoder continues to count encoder edges after an error has been detected. bit 0 of the eiustat register is cleared on the occurrence of the next zero marker provided the error condition no longer exists and the eiucnt register again matches the expected value. following a reset, the mon bit is cleared. encoder pin status three additional status bits are provided in the eiustat regis- ter that provide a measure of the state of the three eiu pins (eia, eib and eizp) following the synchronization bu ffers. bit 3 indicates the state of the eia pin, bit 4 indicates the state of the eib pin and bit 5 gives the state of the eizp pin. the value of these status bits read is not affected by any of the con- trol bits in the eiuctrl register. eia synchroniza- tion buffers eetn(7 0) 16-bit quadrature up/down counter eiumaxcnt(15 0) eetcnt(15 0) eiucnt(15 0) eiustat(2 0) eiuctrl(5 0) eetstat(0) eett(15 0) eetdiv(15 0) eetdeltat(15 0) encoder counter error checking eib eizp pulse decimator eiustat(5 3) clock divider encoder event timer eiuscale (7 0) eiuperiod (15 0) eiutimer (15 0) zp b a or quadrature signal clkin eiu interrupt mon snm zero rev dsp data memory bus encoder interface block encoder loop timer clk timeout direction encoder event timer block figure 16. configuration of encoder interface system of admc300
admc300 C25C rev. b encoder event timer value eiucnt read velocity events quadrature signal eiucnt eib eia eett eetdeltat figure 17. operation of encoder interface unit and en- coder event timer of admc300 in forward direction with eetn = 2. encoder event timer the encoder event timer block forms an integral part of the eiu of the admc300. the eet accurately times the duration between encoder events. the information provided by the eet may be used to make allowances for the asynchronous timing of encoder and dsp-reading events. as a result, more accurate computations of the position and velocity of the motor shaft may be performed. the eet consists of a 16-bit encoder event timer, an encoder pulse decimator and a clock divider as shown in figure 16. the eet clock frequency is selected by the 16-bit read/write eetdiv clock divide register, whose value divides the clkin frequency. the contents of the encoder event timer are incre- mented on each rising edge of the divided clock signal. an eetdiv value of zero gives the maximum divide value of 0x10000 (= 65,536), so that the clock frequency to the encoder event timer is at its minimum possible value. the quadrature signal from the encoder interface unit is deci- mated at a rate determined by the 8-bit read/write eetn regis- ter. for example, writing a value of 2 to eetn, produces a pulse decimator output train at half the quadrature signal fre- quency, as shown in figure 17. the rising edge of this deci- mated signal is termed a velocity event. therefore, for an eetn value of 2, a velocity event occurs every two encoder edges, or on each edge of one of the encoder signals. an eetn value of zero gives an effective pulse decimation value of 256. on the occurrence of a velocity event, the contents of the en- coder event timer are stored in an intermediate interval time register. under normal operation, this register stores the elapsed time between successive velocity events. after, the timer value has been latched at the velocity event, the contents of the encoder event timer are reset to one. latching data from the eet when using the data from the encoder event timer, it is im- portant to latch a triplet set of data at the same instant in time. the three pieces of data are the contents of the encoder quadrature up/down counter, the stored value in the interval time register (giving the precise measured time between the last two velocity events) and the present value of the encoder event timer (giving an indication of how much time has passed since the last velocity event). the data from the eet can be latched on the occurrence of either of two different events. the particular event is selected by bit 4 (eetlatch) of the eiuctrl register. setting this eetlatch bit causes the data to be latched on the time-out of the encoder loop timer (eiutimer). at that time, the contents of the encoder quadrature counter (eiucnt) are la tched to a 16-bit, read-only register eetcnt. in addi- tion, the contents of the intermediate interval time register are latched to the eett register and the contents of the encoder event timer are latched to the eetdeltat register. the three registers, eetcnt, eett and eetdeltat then contain the desired triplet of position/time data required for the control algorithm. in addition, if the time-out of the eiutimer is used to generate an interrupt, the required data is automatically latched and waiting for execution of the inter- rupt service routine (which may be some time after the time-out instant if there are multiple interrupts in the system). by latch- ing the eiucnt register to the eetcnt, the user does not have to worry about changes in the eiucnt register (due to additional encoder edges) prior to servicing of the eiu interrupt. the other eet latch event is chosen by clearing the eetlatch bit of the eiuctrl register. in this mode, whenever the eiucnt register is read by the dsp, the current value of the intermediate interval time register is latched to the eett register and the current value of the encoder event timer is latched to the eetdeltat register. the three registers, eiucnt, eett and eetdeltat now contain the desired triplet of position/speed data required for the control algorithm. note the difference from before in that the encoder count value is now available in the eiucnt register. it is important to realize that the eett and eetdeltat regis- ters are only updated by either the time-out of the eiutimer register (if eetlatch bit is set) or the act of reading the eiucnt register (if the eetlatch bit is cleared). ther efore, if the eetlatch bit is set, the act of reading the eiucnt register will not update the eett and eetdeltat registers. following a reset, bit 4 of the eiuctrl is cleared. eet status register there is a 1-bit eetstat register that indicates whether or not an overflow of the eet has occurred. if the time between successive velocity events is sufficiently long, it is possible that the encoder event timer will overflow. when this condition is detected, bit 0 of the eetstat register is set and the eett register is fixed at 0xffff. reading the eetstat register clears the overflow bit and permits the eett r egister to be up- dated at the next velocity event. if an encoder direction reversal is detected by the eiu, the encoder event timer is set to zero and the eett register is set to its maximum 0xffff value. subsequent velocity events will cause the eett r egister to be updated with the correct value. if a value of 0xffff is read from the eett register, bit 0 of the eetstat register can be read to determine whether an overflow or direction reversal condi- tion exists. in the case of a direction reversal, the contents of the eetdeltat register is valid, representing the time from the direction reversal to the instant at which the eiucnt register is read. on reset the eetn, eetdiv, eetdeltat and eett registers are all cleared to zero. whenever either the eetn or eetdiv registers are written to, the encoder event timer is reset to zero and the eett register is set to zero.
admc300 C26C rev. b eiu/eet registers the eiu and eet registers are summarized at the end of the data sheet. programmable input/output the admc300 has 12 programmable digital input/output pins called pio0 to pio11. each pin may be individually configured as either an input or an output. an associated data register may be used to read data from pins configured as inputs and write data to pins configured as outputs. in addition, each i/o line may be configured as an interrupt source. both edge (rising and falling) and level (high and low) interrupts may be detected. four of the pio lines (pio0 to pio3) have dedicated vector addresses in the interrupt table. the remaining eight interrupts (pio4 to pio11) are multiplexed into a single additional inter- rupt vector location. the pioflag register is used to deter- mine which line caused the interrupt. in addition, all pio lines may be alternatively configured as pwm trip sources. the piopwm register has dedicated bits that may be used to enable this function on each pio line. in this mode, a low level on any pin configured as a pwm trip source shuts down the pwm in a manner identical to the pwmtrip pin. pio configuration each of the 12 programmable input/output lines may be config- ured as either an input or an output by programming the appro- priate bits of the piodir register. this 12-bit read/write register has one bit associated with each i/o line; bit 0 corresponds to pio0, etc. clearing a bit in the piodir register will configure the corresponding pin as an input pin. conversely, setting a bit configures the pin as an output pin. on reset, bits of the piodir register are cleared so that all 12 pio pins are configured as inputs. in addition, all pio lines are internally pulled down in the admc300 so that unconnected lines are seen as low level inputs. three of the pio lines also serve alternate functions. pio9 is multiplexed as the external convert start signal for the adc system. signals on this pin can be used to trigger updating of the adc data registers, if required. also, pio10 and pio11 may be used as inputs to the event timer unit (etu) to accu- rately time the period, frequency or duty cycle of external sig- nals. if these functions are not required, the three pins may be used as general purpose i/o lines. pio data reading/writing associated with the pio system is a data register, piodata, that also has a bit associated with each i/o line. data written to the piodata register will appear on those pins configured as outputs. in addition, reading the piodata register will read the data from those pins configured as inputs. pio interrupt generation each of the twelve pio lines may be configured as an interrupt source. four of the pio lines, pio0 to pio3, have dedicated interrupt vector locations while the remaining eight are multi- plexed into an additional interrupt vector. the piointen enable function is used to enable or disable interrupts on the pio4 to pio11 lines. the picmask register of the program- mable interrupt controller is used to enable interrupts on the four dedicated pio lines, pio0 to pio3. interrupts may be generated on either edge (rising or falling) or level (high or low) events by programming the appropriate bits of both the piomode and piolevel registers. both registers have a dedicated bit for each of the twelve pio lines. setting the appro- priate bit of the piomode register configures the interrupt as level-sensitive, while clearing the bit configures the corres pond- ing pio to be edge sensitive. in level-sensitive mode (piomode bit is 1), setting the corresponding bit in the piolevel register configures the interrupt as active high, while clearing the bit in the piolevel register configures it for active low. in edge-sensitive mode (piomode bit is 0), setting the corresponding bit of the piolevel register configures the interrupt for rising edge, while clearing the bit configures the interrupt for falling edge. on reset, all pio interrupts are dis- abled. the appropriate register settings for correct pio inter- rupt configuration is shown in table vi. table vi. pio interrupt configuration piomode piolevel 0 1 0 falling edge active low 1 rising edge active high the four dedicated pio interrupts from pio0 to pio3 have interrupt vector addresses at program memory addresses 0x0048 for pio0, 0x004c for pio1, 0x0050 for pio2 and 0x0054 for pio3. in the event of an interrupt on pio4 to pio11, the cor- responding bit of the pioflag register is set and the general pio interrupt is activated. this interrupt has a dedicated vector address at location 0x003c. in the interrupt service routine for this interrupt, the user must poll the pioflag register to de- termine which of the pio4 to pio11 lines, that have interrupts enabled, caused the interrupt. of course, if only one of the pio4 to pio11 lines have interrupts enabled, no polling is necessary. reading the pioflag register clears all bits of the register. pio lines that are configured as outputs may also be used to generate interrupts. if, for example, one of the pio lines is configured simultaneously as an output and as an interrupt source, writing the appropriate data to the piodata register will trigger an interrupt. pio as pwm trip sources by setting the appropriate bits of the piopwm register, each of the twelve pio lines can be configured as a pwm trip source. in this mode, a low level on the pio pin will cause a pwm trip that will disable all six pwm outputs on ah to cl. the dis- abling of the pwm is independent of the dsp clock, so that the pwm stage can be fully protected even in the event of a loss of clock signal to the dsp. a pwmtrip interrupt will be generated when the pwm is reset (whether the pwm is reset via a pio configured as a trip source, or via the pwmtrip pin). it is also possible to generate the normal pio interrupts on the occurrence of a falling-edge on the pio line. the advantage of this highly flexible structure for pwm shutdown is that multiple fault signals could be ap- plied to the admc300 at different pio lines. the occurrence of a falling-edge on any of them will instantaneously shut down the pwm. however, based on the particular pio interrupt that is flagged, the user can easily determine the source of the trip. this permits the action of the interrupt service routines follow- ing a pwm trip to be tailored to the particular fault that occurred. on reset, all pio lines are configured as pwm trip sources. because all pio lines are also configured as inputs and have
admc300 C27C rev. b internal pull-down resistors, any unconnected pio lines will cause a pwm trip. therefore, prior to using the pwm unit of the admc300, it is imperative that the pio state be correctly configured for the particular application. pio registers the configuration of all registers associated with the pio sys- tem are shown at the end of the data sheet. each of the registers has a bit directly associated with one of the pio lines. for ex- ample, bit 0 of all registers affects only the pio0 line of the admc300. auxiliary pwm outputs the admc300 provides two auxiliary, fixed-frequency, vari- able duty cycle pwm outputs that may be used to drive auxil- iary switching circuits in the motor control system. alternativ ely, by adding appropriate filtering at the output, these signals can be used to provide a simple digital-to-analog converter. these output signals appear on the aux0 and aux1 pins and are con- trolled by the duty cycle registers, auxtim0 and auxtim1. the auxiliary pwm outputs operate at a fixed frequency that is f clkin /256. this gives an auxiliary pwm switching frequency of 48.8 khz for a 12.5 mhz clkin. the output duty cycle at the auxiliary pwm output pin is controlled by comparing the 8-bit auxiliary pwm duty-cycle registers, auxtim0 and auxtim1 with the contents of a timer. the value written to these registers may range from 0 to 255 so that duty cycles from 0 to 99.6% may be produced at the output pins. a simple filter at the output could then be used to produce a corresponding analog output from 0 to 0.996 v dd . the outputs of the two auxiliary pwm timer circuits are synchro- nized on their rising edges. when the auxiliary timer regis ters are written to, the value becomes effective immediately. therefore, if the value is smaller than the present timer value, the outputs go low immediately. the correct duty cycle appears for the subsequent auxiliary pwm period. on reset, the auxtim0 and auxtim1 registers are cleared so that no auxiliary pwm signals are produced and the aux0 and aux1 pins are low until these registers are programmed. the format of the auxtim0 and auxtim1 registers is shown at the end of the data sheet. watchdog timer the admc300 incorporates a watchdog timer that can per- form a full reset of the dsp and motor control peripherals in the event of software error. the watchdog timer is enabled by writing a timeout value to the 16-bit wdtimer register. the timeout value represents the number of clkin cycles required for the watchdog timer to count down to zero. when the watchdog timer reaches zero, a full dsp core and motor control peripheral reset is performed. in addition, bit 1 of the sysstat register is set so that after reset the admc300 can determine that the reset was due to the time out of the watchdog timer and not a power-on reset. following a reset, bit 1 of the sysstat register may be cleared by writing zero to the wdtimer regis- ter. this clears the status bit but does not enable the watchdog timer. on reset, the watchdog timer is disabled and is only enabled when the first timeout value is written to the wdtimer regis ter. to prevent the watchdog timer from timing out, the user must write to the wdtimer register at regular intervals (shorter than the programmed wdtimer period value). on all but the first write to wdtimer, the particular value written to the register is unimportant since writing to wdtimer simply reloads the first value written to this register. event timer unit the admc300 contains a dual channel event timer unit (etu) that may be used to accurately measure the elapsed time between defined events on a particular channel. the etu uses two input pins, etu0 and etu1, that are multiplexed with the pio10 and pio11 pins. the etu system contains a set of 16-bit data registers that are used to store the value of the dedicated etu timer on the occurrence of the defined events on the input pins. a configuration register is used to define the nature of the events on each of the input pins. in addition, a control register is used to initiate event capture on the inputs. a status register may be read to determine the state of the two capture channels. a dedicated etu interrupt may be generated upon completion of a capture sequence on either the etu0 or etu1 channel. the etu timer is a free running counter whose contents may be read from the 16-bit etutime read only register. an event may be defined as either a rising or falling edge on the associated etu0 and etu1 inputs pins. therefore, the etu system can be used to compute the frequency, period, duty cycle or on-time of signals applied at the inputs. a functional block diagram of the etu system of the admc300 is shown in figure 18. etu event definition the etu system of the admc300 contains a dedicated 16-bit timer whose clock frequency may be programmed using the etudivide register. this register divides the clkin frequency to provide the clock signal for the etu timer. the clock frequency of the etu timer may be expressed as f clkin / etudivide and is common to both channels. two events are used to trigger the etu, termed event a and event b. by setting the appropriate bits of the etuconfig register, it is possible to define both events a and b as either rising or falling edges on the appropriate pin. for example, setting bit 0 of the etuconfig register defines event a of the etu0 channel as a rising edge on the etu0 pin. similarly, setting bit 4 of the etuconfig register defines event a of the etu1 channel as a rising edge on the etu1 pin. event a defines the start of the event capture sequence. associated with each etu channel are three data registers, etua0, etub0 and etuaa0 for etu channel 0 and etua1, etub1 and etuaa1 for etu channel 1. these data registers store the etu timer value on the occurrence of the first a event, the first b event and the second a event respectively. for example, for etu channel 0, etua0 stores the timer value on the first occurrence of event a on the etu0 pin, etub0 stores the timer value on the first occurrence of event b on the etu0 pin and etuaa0 stores the timer value on the second occurrence of event a on the etu0 pin. registers etua1, etub1 and etuaa1 perform the same function for events on etu channel 1. because the etu0 and etu1 pins are multiplexed with the pio10 and pio11 pins, it is possible to configure these lines as
admc300 C28C rev. b digital outputs using the piodir register. in this mode, writing suitable patterns to the piodata register will trigger the corresponding event capture on the etu channels. etu interrupt generation the completion of the event capture sequence can be defined as either the occurrence of event b or the second occurrence of event a by setting the appropriate bits of the etuconfig register. at the end of the capture sequence, the etu gener- ates an interrupt. for example, if bit 2 of the etuconfig register is set, etu channel 0 will generate an etu interrupt on the occurrence of event b on the etu0 pin. on the other hand, if bit 6 of the etuconfig register is cleared, etu channel 1 will generate an etu interrupt on the occurrence of the second event a on the etu1 pin. both etu channels generate the same interrupt to the dsp when capture is com- plete. if both etu channels are used simultaneously, the etustat register can be polled to determine which caused the interrupt. if capture on etu channel 0 is complete, bit 0 of the etustat register is set; if capture on etu channel 1 is complete, bit 1 is set. reading the etustat register auto- matically clears all bits of the register. clkin etu0 etu interrupt etu1 etudivide (15 0) event detector event detector etua0 (15 0) etub0 (15 0) etuaa0 (15 0) etu timer etua1 (15 0) etub1 (15 0) etuaa1 (15 0) etuconfig (7) 0 etuctrl (1 0) etustat (1 0) etutime (15 0) figure 18. functional block diagram of event timer unit etu operating modes the etu channels of the admc300 can operate in two dis- tinct modes; single shot and free-running. the particular mode may be selected for etu channel 0 by programming bit 3 of the etuconfig register and for etu channel 1 by program- ming bit 7 of the etuconfig register. setting these bits puts the respective etu channel in free-running mode while clearing the bits enables the single-shot mode. in single-shot mode, upon completion of the capture sequence, further event capture is disabled until the appropriate bit of the etuctrl register has been set. setting bit 0 of the etuctrl register restarts the capture for etu channel 0, while bit 1 restarts capture for channel 1. in the free-running mode, the bits of the etuctrl register remain set and the etu channel continues to capture following the generation of the interrupt. etu registers the configuration of the etu registers is shown at the end of the data sheet. interrupt control operation and control of the various interrupt sources is man- aged by a combination of the internal interrupt controller of the dsp core and a dedicated programmable interrupt controller (pic) that manages all interrupts from the motor control peripher- als. eight internal dsp core interrupts comprise the peripheral ( irq2 ), sport0 transmit and receive, two software, sport1 transmit and receive (or alternatively irq1 and irq0 ), and the timer interrupts. the admc300 includes eleven additional interrupts that are interfaced to the dsp core through the irq2 interrupt. the eleven peripheral interrupts include two adc interrupts (one per bank), the pwmsync interrupt, the five pio interrupts (four dedicated to pio0 to pio3 and the com- bined pio4 to pio11 interrupt), the eiu interrupt, the etu interrupt and the pwmtrip interr upt. each of the nineteen interrupts of the admc300 has a dedicated four word sec- tion in the interrupt vector table. the start address in the interrupt vector table for each of the nineteen admc300 interrupt sources is tabulated in table vii. the interrupts are listed from the h ighest priority to the lowest priority. the entire interrupt control system of the admc300 is config- ured and controlled by the ifc, imask and icntl registers of the dsp core and the picmask and picvector registers of the pic block. table vii. interrupt vector addresses interrupt vector interrupt source address peripheral interrupt ( irq2 ) 0x0004 (h ighest prior ity) adc bank a update 0x0030 pwmsync 0x0034 adc bank b update 0x0038 pio interrupt (pio4 to pio11) 0x003c encoder interface interrupt 0x0040 event timer unit interrupt 0x0044 pio0 interrupt 0x0048 pio1 interrupt 0x004c pio2 interrupt 0x0050 pio3 interrupt 0x0054 pwmtrip interrupt 0x0058 sport0 transmit interrupt 0x0010 sport0 receive interrupt 0x0014 software interrupt 1 0x0018 software interrupt 0 0x001c sport1 tr ansmit interrupt or irq1 0x0020 sport1 receive interrupt or irq0 0x0024 timer 0x0028 (lowest priority) interrupt masking interrupt masking (or disabling) is controlled by the imask register of the dsp core and the picmask register. these registers contain individual bits that must be set to enable the various interrupt sources. it is important to remember that if any peripheral interrupt is to be enabled both the irq2 interrupt enable bit (bit 9) of the imask register and the appropriate bit of the picmask register must be set. the configuration of both the imask and picmask registers of the admc300 is shown at the end of the data sheet.
admc300 C29C rev. b interrupt configuration the ifc and icntl registers of the dsp core control and configure the interrupt controller of the dsp core. the ifc register is a 16-bit register that may be used to force and/or clear any of the eight dsp interrupts. bits 0 to 7 of the ifc register may be used to clear the dsp interrupts while bits 8 to 15 can be used to force a corresponding interrupt. writing to bits 11 and 12 in ifc is the only way to create the two software interrupts. the icntl register is used to configure the sensitivity (edge or level) of the irq0 , irq1 and irq2 interrupts and to enable/ disable interrupt nesting. setting bit 0 of icntl configures the irq0 as edge sensitive while clearing the bit configures it for level sensitive. bit 1 is used to configure the irq1 interrupt and bit 2 is used to configure the irq2 interrupt. it is recommended that the irq2 interrupt be always configured for level sensitive as this ensures that no peripheral interrupts are lost. setting bit 4 of the icntl register enables interrupt nesting. the configura- tion of both ifc and icntl registers is shown at the end of the data sheet. interrupt operation following a reset, the rom code monitor of the admc300 copies a default interrupt vector table into program memory ram from address 0x0000 to 0x005f. since each interrupt source has a dedicated four word space in this vector table, it is possible to code short interrupt service routines (isr) in place. alternatively, it may be required to insert a jump instruction to the appropriate start address of the interrupt service routine if more memory is required for the isr. on the occurrence of an interrupt, the program sequencer en- sures that there is no latency (beyond synchronization delay) when processing unmasked interrupts. in the case of the timer, sport0, sport1 and software interrupts, the interrupt con- troller automatically jumps to the appropriate location in the interrupt vector table. at this point, a jump instruction to the appropriate isr is required. in the event of a motor control peripheral interrupt, the opera- tion is slightly different. for any of the eleven peripheral inter- rupts, the interrupt controller automatically jumps to location 0x0004 in the interrupt vector table. in addition, the required vector address (between 0x0030 and 0x0058) associated with the particular interrupt source is placed in the picvector register of the pic block. code loaded at location 0x0004 by the monitor on reset subsequently performs a jump from loca- tion 0x0004 to the address specified in the picvector regis- ter. this operation with the picvector register results in a slightly longer latency associated with processing any of the peripheral interrupts, as compared with the latency of the inter- nal dsp core interrupts. the code located at location 0x0004 by the monitor on reset is as follows: 0x0004: dm (i4_save) = i4; i4 = dm (picvector); jump (i4 ); the default code for each of the motor control peripherals is: i4 = dm (i4_save); rti; note that this default restores i4 to its value before the inter- rupt. the user should replace the rti with a jump to their isr. the put_vector rom subroutine can be used to replace the rti with the jump. the pic block manages the sequencing of the eleven motor control peripheral interrupts. in the case of multiple simulta- neous interrupts, the pic will load the picvector register with the vector address of the highest priority pending interrupt. the contents of the picvector register will remain fixed until read by the dsp. this action is performed by the default dsp code at location 0x0004. the pic block only asserts a new interrupt after the picvector register has been read. system controller the system controller block of the admc300 performs a num- ber of distinct functions: 1. manages the interface and data transfer between the dsp core and the motor control peripherals. 2. controls the multiplexing of the sport1 pins to select either the dr1a or dr1b data receive pins. it also allows configuration of sport1 as a uart interface. 3. manages the software flags of the dsp core. 4. contains a status register (sysstat) that indicates the state of the pwmtrip , pwmpol pins and the watchdog timer. 5. performs a reset of the motor control peripherals and control registers following a hardware, software or watchdog initiated reset. dsp core sport1 dr1a dr1b tfs1 rfs1/ srom sclk1 modectrl (5 4) uarten dr1sel dt1 dr1 tfs1 rfs1 sclk1 fl1 admc300 dt1 figure 19. internal multiplexing of sport1 pins sport1 control the admc300 uses sport1 as the default serial port for boot loading and as the interface to the development environment. there are two data receive pins, dr1a and dr1b, on the admc300. this permits dr1a to be used as the data receive pin when interfacing to serial rom or e 2 prom for boot load- ing. alternatively, if connecting through another external device for either boot loading or interface to the development environ- ment, the dr1b pin can be used. both data receive pins are multiplexed internally into the single data receive input of
admc300 C30C rev. b sport1. two control bits in the modectrl register control the state of the sport1 pins by manipulating internal multi- plexers in the admc300. the configuration of sport1 is illustrated in figure 19. bit 4 of the modectrl register (dr1sel) selects between the two data receive pins. setting bit 4 of modectrl con- nects the dr1b pin to the internal data receive port dr1 of sport1. clearing bit 4 connects dr1a to dr1. setting bit 5 of the modectrl register (uarten) config- ures the serial port for uart mode. in this mode, the dr1 and rfs1 pins of the internal serial port are connected to- gether. additionally, setting the uarten bit connects the fl1 flag of the dsp to the external rfs1/ srom pin. in this mode, this pin is intended to be used to reset the external serial rom device. the monitor code in rom automatically configures the sport1 pins during the boot sequence. initially, the dr1sel bit is cleared and the uarten bit is set so that the admc300 first attempts to perform a reset of the external memory device using the rfs1/srom pin. this is accomplished by toggling the fl1 flag using the following code segment: sromreset: set fl1; toggle fl1; toggle fl1; rts; if successful, data will be clocked from the external device in a continuous stream. the start of the data stream is detected by the serial port on the rfs1 pin, which is connected internally to the dr1 pin in this mode. if the serial load is successful, code is downloaded and execution begins at the start of user program memory (address 0x0060). following a synchronous boot load, sport1 could be configured for normal synchro- nous serial mode by setting the dr1sel pin to select the dr1b data receive pin and by clearing the uarten bit to return to sport mode. failing a synchronous boot load, the admc300 monitor auto- matically sets the dr1sel bit to select the dr1b pin and remains in uarten mode. the monitor code then waits for a header byte that tells it with which of the other interfaces it is to communicate. obviously, if a debugger interface is required on sport1, it is not possible to use sport1 as a general pur- pose synchronous serial port. if such a serial port is required, it is recommended that sport0 be used. flag pins the admc300 provides flag pins. the alternate configuration of sport1 includes a flag in (fi) and flag out (fo) pin. this alternate configuration of sport1 is selected by bit 10 of the dsp system control register, syscntl at data memory address, 0x3fff. in the alternate configuration, the dr1 pin (either dr1a or dr1b depending on the state of the dr1sel bit) becomes the fi pin and the dt1 pin becomes the fo pin. additionally, rfs1 is configured as the irq0 interrupt input and tfs1 is configured as the irq1 interrupt. the serial port clock, sclk1, is still available in the alternate configuration. following boot loading from a serial memory device, it is pos- sible to reconfigure the sport1 to this alternate configuration. however, if a debugger interface is used, this configuration is not possible as the normal serial port pins are required for debugger communications. the admc300 also contains two software flags, fl1 and fl2. these flags may be controlled in software and perform specific functions on the admc300. the fl1 pin has already been described and is used to perform a reset of the external memory device via the rfs1/ srom pin. the fl2 flag is used specifi- cally to perform a full peripheral reset of the chip (including the watchdog timer). this is accomplished by toggling the fl2 flag in software using the following code segment: preset: set fl2: toggle fl2; toggle fl2; rts; system control registers the system controller includes two registers, the modectrl register used to control the multiplexing of the sport1 pins and pwm operating mode, and the sysstat register that displays various status information. the format of these registers is shown at the end of the data sheet. bit 0 of the sysstat register indicates the state of the pwmtrip pin. if this bit is set, the pwmtrip pin is high and no pwm trip is occurring. if this bit is cleared, then the pwm is shut down. bit 1 of the sysstat register is set following a watchdog timeout. this bit is cleared in normal operation. fi- nally, bit 2 indicates the status of the pwmpol pin. if this bit is set, the pwmpol pin is high and active high pwm outputs will be produced. bit 3 indicates the half cycle in which the pwm is operating. register memory map the address, name, used bits and function of all motor control peripheral registers of the admc300 are tabulated in table viii. in addition, the relevant dsp core registers are tabulated in table ix. full details of the dsp core registers can be ob- tained by referring to the adsp-2171 sections of the adsp-2100 family user s manual, third edition. development kit to facilitate device evaluation and programming, an evaluation kit (admc300-advevalkit) is available from analog de- vices. the evaluation kit consists of an evaluation board and the motion control debugger software. the evaluation kit contains latest programming and device information. it is rec- ommended that the evaluation kit be used for initial program development.
admc300 C31C rev. b table viii. peripheral register map of admc300 address name bits function 0x2000 0x2007 reserved 0x2008 pwmtm [15 ...0] pwm period register 0x2009 pwmdt [9 ...0] pwm deadtime r egister 0x200a pwmpd [9 ...0] pwm p ulse deletion register 0x200b pwmgate [9 ...0] pwm g ate drive configuration 0x200c pwmcha [15 ...0] pwm c hannel a duty cycle 0x200d pwmchb [15 ...0] pwm c hannel b duty cycle 0x200e pwmchc [15 ...0] pwm chan nel c duty cycle 0x200f pwmseg [8 ...0] pwm segment select register 0x2010 auxtim0 [7 ...0] a ux. pwm channel 0 duty cycle 0x2011 auxtim1 [7 ...0] a ux. pwm channel 1 duty cycle 0x2012 0x2014 reserved 0x2015 modectrl [6 ...4] m ode control register 0x2016 sysstat [3 ...0] system status register 0x2017 reserved 0x2018 wdtimer [15 ...0] w atchdog timer register 0x2019 0x201b reserved 0x201c picvector [15 ...0] peripheral interrupt vector address 0x201d picmask [10 ...0] peripheral interrupt mask register 0x201e-0x201f reserved 0x2020 eiucnt [15 ...0] e ncoder count register 0x2021 eiumaxcnt [15 ...0] e ncoder maximum count register 0x2022 eiustat [6 ...0] e ncoder interface status register 0x2023 eiuctrl [5 ...0] e ncoder interface control register 0x2024 eiuperiod [15 ...0] e ncoder loop timer period register 0x2025 eiuscale [7 ...0] e ncoder loop timer scale register 0x2026 eiutimer [15 ...0] e ncoder loop timer 0x2027 eetcnt [15 ...0] l atched value of eiucnt register 0x2028 eetn [7 ...0] e ncoder event timer pulse decimator 0x2029 eetdiv [15 ...0] e ncoder event timer clock divide 0x202a eetdeltat [15 ...0] e ncoder event timer delta time 0x202b eett [15 ...0] e ncoder event timer period register 0x202c eetstat [0] encoder event timer status register 0x202d 0x202f reserved 0x2030 adc1 [15 ...0] adc channel 1 data register 0x2031 adc2 [15 ...0] adc channel 2 data register 0x2032 adc3 [15 ...0] adc channel 3 data register 0x2033 adc4 [15 ...0] adc channel 4 data register 0x2034 adc5 [15 ...0] adc channel 5 data register 0x2035 reserved 0x2036 adcctrl [15 ...0] adc control register 0x2037 adcstat [0] adc status register 0x2038 adcsync [6 ...0] adc synchronization register 0x2039 adcdiva [11 ...6] adc bank a clock divide register 0x203a adcdivb [11 ...6] adc bank b clock divide register 0x203b adccal [4 ...0] adc calibration register 0x203c 0x203f reserved 0x2040 piolevel [11 ...0] pio interrupt configuration 0x2041 piomode [11 ...0] pio interrupt mode control 0x2042 piopwm [11 ...0] pio pwm t rip control 0x2043 reserved 0x2044 piodir [11 ...0] pio d irection control 0x2045 piodata [11 ...0] pio d ata register 0x2046 piointen [11 ...4] pio interrupt enable register 0x2047 pioflag [11 ...4] pio interrupt flag register 0x2048 0x204f reserved 0x2050 etua0 [15 ...0] e vent timer event a channel 0
admc300 C32C rev. b table viii. peripheral register map of admc300 (continued) address name bits function 0x2051 etub0 [15 . . . 0] event timer event b channel 0 0x2052 etuaa0 [15 . . . 0] event timer event aa channel 0 0x2053 etua1 [15 . . . 0] event timer a channnel 1 0x2054 etub1 [15 . . . 0] event timer event b channel 1 0x2055 etuaa1 [15 . . . 0] event timer event aa channel 1 0x2056 etutime [15 . . . 0] etu timer register 0x2057 0x205b reserved 0x205c etuconfig [7 . . . 0] event timer configuration 0x205d etudivide [15 . . . 0] event timer clock divide register 0x205e etustat [1 . . . 0] event timer status register 0x205f etuctrl [1 . . . 0] event timer control register 0x2060 pwmsyncwt [7 . . . 0] pwmsync pulsewidth control register 0x2061 pwmswt [0] pwm software trip register 0x2062-0x20ff reserved table ix. dsp core registers address name bits function 0x3fff syscntl [15 . . . 0] system control register 0x3ffe memwait [15 . . . 0] memory wait state control register 0x3ffd tperiod [15 . . . 0] interval timer period register 0x3ffc tcount [15 . . . 0] interval timer count register 0x3ffb tscale [7 ...0] interval timer scale register 0x3ffa sport0_rx_words1 [15 . . . 0] sport0 multichannel word 1 receive 0x3ff9 sport0_rx_words0 [15 . . . 0] sport0 multichannel word 0 receive 0x3ff8 sport0_tx_words1 [15 . . . 0] sport0 multichannel word 1 transmit 0x3ff7 sport0_tx_words0 [15 . . . 0] sport0 multichannel word 0 transmit 0x3ff6 sport0_ctrl_reg [15 . . . 0] sport0 control register 0x3ff5 sport0_sclkdiv [15 . . . 0] sport0 clock divide register 0x3ff4 sport0_rfsdiv [15 . . . 0] sport0 receive frame sync divide 0x3ff3 sport0_autobuf_ctrl [15 . . . 0] sport0 autobuffer control register 0x3ff2 sport1_ctrl_reg [15 . . . 0] sport1 control register 0x3ff1 sport1_sclkdiv [15 . . . 0] sport1 clock divide register 0x3ff0 sport1_rfsdiv [15 . . . 0] sport1 receive frame sync divide 0x3fef sport1_autobuf_ctrl [15 . . . 0] sport1 autobuffer control register
admc300 C33C rev. b 0 0 0 0 0 0 0 0 0 0 00 0 0 0 dm (0x2037) busy signal adcstat (r) 0 = normal 1 = filters busy settling 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 adcctrl (r/w) dm (0x2036) bank a convert start 0 = internal 1 = external bank b convert start bank a mode 0 = convst 1 = read bank b mode mux0 control 0 = low 1 = high mux1 control mux2 control bank a synchronization 0 = disable 1 = enable bank b synchronization 0 = normal 1 = reset filter mode 0 = normal 1 = reset modulator mode reserved (set to 1) reference power-down 0 = power-on 1 = power-down bank b power-down 0 = power-on 1 = power-down bank a power-down busy signal 0 = bank a 1 = bank b adc1 (r) adc2 (r) adc3 (r) adc4 (r) adc5 (r) dm (0x2030) dm (0x2031) dm (0x2032) dm (0x2033) dm (0x2034) dm (0x2038) relative phase of pwmsync to adc convst adcsync (r/w) 0 0 00 0 0 0 0 0 0 0 00 0 0 0 1514131211109876543210 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1514131211109876543210 figure 20. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset for r/w registers. reserved bits are sh own on a gray field these bits should always be written as shown.
admc300 C34C rev. b 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 adccal (r/w) dm (0x203b) adc1 calibration adc2 calibration adc3 calibration adc4 calibration adc5 calibration 0 = disable 1 = enable dm (0x2039) adc bank a divide value adcdiva (r/w) 0 0 1 1 0 0 0 01 1 1 10 0 0 0 dm (0x203a) adc bank b divide value adcdivb (r/w) 0 0 1 1 0 0 0 01 1 1 10 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 figure 21. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset for r/w registers. reserved bits are sh own on a gray field these bits should always be written as shown.
admc300 C35C rev. b 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0000000 00 0 pwmdt (r/w) dm (0x2009) pwmtm (r/w) pwmcha (r/w) pwmchb (r/w) pwmchc (r/w) dm (0x2008) dm (0x200c) dm (0x200d) dm (0x200e) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 1 = disable 0 = enable ch enable cl enable bh enable bl enable ah enable al enable ah/al crossover bh/bl crossover ch/cl crossover dm (0x200f) pwmseg (r/w) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0100111 0 pwmsyncwt (r/w) dm (0x2060) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 pwmswt (r/w) dm (0x2061) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0000000 00 0 pwmpd (r/w) dm (0x200a) 15 14 13 12 11 10 9 8 76 54 3210 0000000 00 0 pwmgate (r/w) dm (0x200b) gdclk 1 = enable 0 = disable low-side chopping high-side chopping 1 = enable 0 = disable figure 22. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset for r/w registers. reserved bits are sh own on a gray field these bits should always be written as shown.
admc300 C36C rev. b 0 00 0 0 0 dm (0x2023) eiuctrl (r/w) eiumaxcnt (r/w) dm (0x2021) 0 0 0 0 00 0 0 0 first zero marker 1 = received 0 = not received eiu count error 1 = error 0 = no error dm (0x2022) eiustat (r) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 eiuscale (r/w) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 eiucnt (r/w) eiuperiod (r/w) eiutimer (r/w) eetcnt (r) dm (0x2020) dm (0x2024) dm (0x2026) dm (0x2027) dm (0x2025) eiu count direction 1 = up 0 = down eiu state 1 = not initialized 0 = initialized eizp state eib state eia state 1 = hi 0 = lo 1 = enable 0 = disable direction reverse 1 = swap eia and eib 0 = do not swap eia/eib zero marker 1 = use for reset 0 = do not use single north marker mode 1 = enable 0 = disable enable eiu loop timer 1 = eiutimer timeout 0 = eiucnt read eet latch definition 1 = enable 0 = disable eiu error monitoring 0 0 0 0 0 0 0 0 0 0 0 00 0 0 0 figure 23. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset for r/w registers. reserved bits are sh own on a gray field these bits should always be written as shown.
admc300 C37C rev. b 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 00 0 0 00 0 0 0 = no overflow 1 = overflow eetstat(r) dm (0x202c) encoder event timer overflow 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dm (0x2028) eetn (r/w) dm (0x202b) eett (r) dm (0x2029) eetdiv (r/w) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dm (0x202a) eetdeltat (r) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 figure 24. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset for r/w registers. reserved bits are sh own on a gray field these bits should always be written as shown.
admc300 C38C rev. b piolevel (r/w) dm (0x2040) 0 = falling edge (piomode = 0) = active low (piomode = 1) 1 = rising edge (piomode = 0) = active high (piomode = 1) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dm (0x2041) 0 = edge sensitive 1 = level sensitive piomode (r/w) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dm (0x2042) 0 = pwm trip disable 1 = pwm trip enable piopwm (r/w) 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 1 1 1 0 0 0 0 1 1 1 11 1 1 1 dm (0x2044) 0 = input 1 = output piodir (r/w) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 pioflag (r) dm (0x2047) 0 = no interrupt 1 = interrupt flagged 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dm (0x2046) piointen (r/w) 0 = interrupt disable 1 = interrupt enable dm (0x2045) 0 = low level 1 = high level piodata (r/w) 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 figure 25. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset for r/w registers. reserved bits are sh own on a gray field these bits should always be written as shown.
admc300 C39C rev. b auxtim1 (w) dm (0x2011) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 auxtim0 (w) dm (0x2010) aux0 duty cycle = auxtim0/256 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 aux1 duty cycle = auxtim1/256 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15141312111098 7654 3210 etua0 (r) etub0 (r) etuaa0 (r) etua1 (r) etub1 (r) etuaa1 (r) etutime (r) dm (0x2050) dm (0x2051) dm (0x2052) dm (0x2053) dm (0x2054) dm (0x2055) dm (0x2056) etuconfig (r/w) dm (0x205c) etu1 event a etu1 event b etu1 interrupt etu1 mode etu0 event a etu0 event b etu0 interrupt etu0 mode 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 = falling edge 1 = rising edge 0 = falling edge 1 = rising edge 0 = next event a 1 = event b 0 = single-shot 1 = free-running 0 = falling edge 1 = rising edge 0 = falling edge 1 = rising edge 0 = next event a 1 = event b 0 = single-shot 1 = free-running etudivide (r/w) dm (0x205d) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 0 0 0 0 00 0 0 00 0 etustat (r) dm (0x205e) etu1 etu0 0 = not captured 1 = sequence captured 0 = not captured 1 = sequence captured dm (0x205f) etu1 etu0 etuctrl (r/w) 0 = do not start 1 = start capture 0 = do not capture 1 = start capture 0 0 0 0 0 0 0 00 0 0 00 0 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 figure 26. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset for r/w registers. reserved bits are sh own on a gray field these bits should always be written as shown.
admc300 C40C rev. b adc bank a pwmsync adc bank b event timer dm (0x201d) picmask (r/w) pwmtrip 0 = disable (mask) 1 = enable encoder interface 0 0 0 0 0 0 0 00 0 0 00 0 0 0 pio3 pio2 pio1 pio0 pio (pio4 to pio11) 0 = disable (mask) 1 = enable imask (r/w) peripheral (or irq2 ) reserved (set to 0) sport0 transmit sport0 receive timer sport1 receive (or irq0 ) sport1 transmit (or irq1 ) software 0 software 1 0 = disable (mask) 1 = enable 0 0 0 0 0 0 0 00 0 0 00 1 1 0 dsp register 0 = disable (mask) 1 = enable 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 1 1 0 0 0 irq0 sensitivity 0 = level 1 = edge icntl irq1 sensitivity irq2 sensitivity interrupt nesting 0 = disable 1 = enable dsp register sport1 receive or irq0 interrupt force interrupt clear timer software 0 software 1 sport0 receive sport0 transmit irq2 sport1 receive or irq0 timer software 0 software 1 sport0 receive sport0 transmit sport1 transmit or irq1 irq2 sport1 transmit or irq1 ifc 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 dsp register 43210 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 figure 27. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset for r/w registers. reserved bits are sh own on a gray field these bits should always be written as shown.
admc300 C41C rev. b 0 0 0 0 0 0 0 10 0 0 00 0 0 0 dm (0x3ffe) memwait (r/w) 0 0 0 0 0 0 0 00 0 1 10 0 0 0 sport1 configure 0 = fi, fo, irq0 , irq1 , sclk 1 = serial port sport0 enable sport1 enable 0 = disabled 1 = enabled 0 = disabled 1 = enabled syscntl (r/w) dm (0x3fff) modectrl (r/w) dm (0x2015) data receive select 1 = dr1b 0 = dr1a 1 = uart mode 0 = sport mode sport1 mode sysstat (r) dm (0x2016) 1 = hi 0 = lo 1 = watchdog trip 0 = no watchdog trip pwmtrip pin state watchdog flag pwmpol pin state 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0 0 0 1 = hi = > active hi 0 = lo = > active lo pwm phase flag 1 = second half cycle 0 = first half cycle pwm mode 1 = double update 0 = single update figure 28. configuration of admc300 registers default bit values are shown; if no value is shown, the bit field is undefined at reset. reserved bits are shown on a gray fiel d these bits should always be written as shown.
admc300 C42C rev. b 80-lead tqfp (st-80) seating plane 0.063 (1.60) max 0.030 (0.75) 0.020 (0.50) 0.004 (0.10) max 0.057 (1.45) 0.053 (1.35) 0.006 (0.15) 0.002 (0.05) 0.014 (0.35) 0.010 (0.25) 0.640 (16.25) 0.620 (15.75) 0.553 (14.05) 0.549 (13.95) 0.553 (14.05) 0.549 (13.95 0.640 (16.25) 0.620 (15.75) 1 20 21 41 40 60 61 80 top view (pins down) 0.486 (12.35) typ 0.486 (12.35) typ 0.029 (0.73) 0.022 (0.57) outline dimensions dimensions shown in inches and (mm). c3205bC5C6/00 (rev. b) 00103 printed in u.s.a.


▲Up To Search▲   

 
Price & Availability of ADMC300BST

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X